add_internal_dnc tool manages your organization’s private Do Not Call list. Use it to add numbers when contacts request no further calls, or remove numbers when appropriate.
Parameters
string[]
required
Phone numbers in 10-digit North American format (e.g.,
"8663625478").string
required
Action to perform:
add- Add numbers to Internal DNC listremove- Remove numbers from Internal DNC list (requires an elevated role, see below)
remove requires an elevated role. The API key’s user must be a
Supervisor or Administrator, unless removal has been enabled for the Agent
role on your account. add is available to every role. An Agent key
attempting remove fails with API_ERROR.See Internal DNC List for the underlying
API.string
API key. Only required if not provided via the
x-dncscrub-api-key HTTP header.string
Project ID to scope the Internal DNC list. Useful for multi-client or multi-campaign setups.
Response
boolean
Whether the API call succeeded.
string
The action that was performed:
add or remove.number
How many phone numbers were processed.
string[]
The phone numbers that were processed.
array
Array of results for each phone number, in the order they were submitted.
string
Machine-readable error code (when failed).
string
Human-readable error description (when failed).
The underlying API confirms an
add or remove without saying what each
number’s prior state was, so the tool reads the list immediately before
changing it and reports the difference. Each status therefore reflects a
snapshot taken just before the change; a concurrent edit to the same list can
make it stale. results is omitted entirely if that read does not return
JSON — success still tells you whether the change itself went through.Error Codes
Examples
- Add Request
- Add Response
- Remove Request
- Remove Response
Usage Notes
- Adding a number that already exists has no effect (idempotent);
resultsreports it asalready_exists - Removing a number that isn’t on the list has no effect;
resultsreports it asnot_found - Use
projIdto maintain separate Internal DNC lists per project or client - Phone numbers must be exactly 10 digits without formatting