Mail each week's new records
POST
/api/v1/leads/lists/{id}/auto-mail
const url = 'https://digize.com/api/v1/leads/lists/example/auto-mail';const options = { method: 'POST', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"on":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://digize.com/api/v1/leads/lists/example/auto-mail \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \ --header 'x-api-key: <x-api-key>' \ --data '{ "on": true }'Turns on or off sending each weekly delivery’s new records the list’s latest mailing, through Click2Mail.
Needs the crm:write permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.
Example
5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
on
required
boolean
Example generated
{ "on": true}Responses
Section titled “Responses”Done
Media typeapplication/json
object
id
required
string
name
required
string
orderNumber
required
LeadsPlease’s id for the order.
string | null
filters
required
object
type
required
string
zips
required
Array<string>
radius
required
ages
required
Array<string>
homeownership
required
string
children
required
string
industries
required
Array<string>
employees
required
Array<string>
phones
required
boolean
emails
required
boolean
environment
required
string
count
required
number
cost
required
In cents: the order and every weekly delivery.
number
status
required
string
error
required
string | null
standing
required
New records arrive every week.
boolean
autoMail
required
boolean
lastAdded
required
number
weeklyProblem
required
string | null
crmTag
required
string | null
importing
required
boolean
purchasedBy
required
string
purchasedAt
required
string format: date-time
expiresAt
required
string format: date-time
Example
{ "filters": { "type": "new_homeowners", "zips": [], "radius": null, "movedWithinDays": 30, "ages": [], "minIncome": 0, "homeownership": "any", "children": "any", "industries": [], "employees": [], "phones": false, "emails": false }, "environment": "live", "status": "building"}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}