curl --location 'https://api.weya.live/backend/api/dnc/add' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumber": "+12125551234",
"type": "Call"
}'
{
"status": true,
"code": 200,
"message": "Phone number added to DNC successfully",
"errorMessage": null,
"data": []
}
DNC (Do Not Call)
Add to DNC List
Add a phone number to your organization’s Do Not Call (DNC) list.
POST
/
api
/
dnc
/
add
curl --location 'https://api.weya.live/backend/api/dnc/add' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumber": "+12125551234",
"type": "Call"
}'
{
"status": true,
"code": 200,
"message": "Phone number added to DNC successfully",
"errorMessage": null,
"data": []
}
Overview
Add a phone number to your organization’s Do Not Call (DNC) list. Numbers on the list are not called by any campaign in your organization: when a contact’s number is on the list, the call is skipped. An email notification is sent to your organization when a number is added.Prerequisites
- An API key for your workspace
- To link the entry to a call: the campaign’s
batchIdand the call’srequestUUID
Request
Phone number in E.164 format with the
+ and country code, for example +12125551234. The number is stored exactly as sent and must match the contact’s number exactly to block calls, so a number without the + won’t block anything.Label for the entry:
Call, Email or Whatsapp. Calls are skipped for every entry whatever its type.ID of the campaign whose call led to this request. Requires
requestUUID. The call’s recording and transcription are saved with the entry.curl --location 'https://api.weya.live/backend/api/dnc/add' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumber": "+12125551234",
"type": "Call"
}'
Response
{
"status": true,
"code": 200,
"message": "Phone number added to DNC successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request
phoneNumber is required.requestUUID is required when batchId is provided.Phone number already exists in DNC for this organization.
- 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
Batch not found, orCall record not found for the given batchId and requestUUID. - 500 Internal Server Error – Unexpected server error.
The DNC list applies to every campaign in your organization. A campaign’s DNC setting and the organization’s DNC switch don’t change which numbers are skipped.
Was this page helpful?

