Authentication, scopes, rate limits, errors, retrying safely and paging are explained once, on the API reference.
Every request needs a token with the scope shown on its endpoint; without it the answer is 403.
Do-Not-Call
Add a number to Do-Not-Call
POST/api/v1/dncScope dnc:write
Put a number on your Do-Not-Call list. It is never called again, by any campaign, workflow or person, until it is taken off. Every contact with the number is marked.
Parameters
Parameter
Type
What it is
Idempotency-Key
string, up to 255 characters, in the headers
Any unique text up to 255 characters, such as a UUID, chosen by you for this request. Sent again with the same body within 24 hours, the first answer comes back (with Idempotent-Replayed: true) and nothing is done twice. The same key with another body is refused with 422.
Request body (application/json)
Field
Type
What it is
phonerequired
string, up to 20 characters
The number never to call, in any format.
Answer (200): these fields
Field
Type
What it is
phonerequired
string
—
on_listrequired
boolean
Whether the number is on the Do-Not-Call list now.
changedrequired
boolean
false when it already was (adding) or already was not (removing).
Errors
Code
When
401
The token is missing, unknown or revoked, or its workspace was deleted.
402
The workspace's plan does not include API access. The token is paused, not revoked: it works again as soon as the plan includes API access.
403
The token does not have this endpoint's scope, it is a sandbox token, the workspace is suspended, or the request came from a network the workspace, or the token's IP allowlist, does not allow.
422
A field is missing or not in the form this endpoint takes. detail says which, and why.
429
This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait.
Take a number off your Do-Not-Call list, so it may be called again straight away. Do this only when the person asked to be called again: their opt-out is a legal obligation.
Parameters
Parameter
Type
What it is
phonerequired
string, in the path
—
Idempotency-Key
string, up to 255 characters, in the headers
Any unique text up to 255 characters, such as a UUID, chosen by you for this request. Sent again with the same body within 24 hours, the first answer comes back (with Idempotent-Replayed: true) and nothing is done twice. The same key with another body is refused with 422.
Answer (200): these fields
Field
Type
What it is
phonerequired
string
—
on_listrequired
boolean
Whether the number is on the Do-Not-Call list now.
changedrequired
boolean
false when it already was (adding) or already was not (removing).
Errors
Code
When
401
The token is missing, unknown or revoked, or its workspace was deleted.
402
The workspace's plan does not include API access. The token is paused, not revoked: it works again as soon as the plan includes API access.
403
The token does not have this endpoint's scope, it is a sandbox token, the workspace is suspended, or the request came from a network the workspace, or the token's IP allowlist, does not allow.
422
A field is missing or not in the form this endpoint takes. detail says which, and why.
429
This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait.