curl --location 'https://api.weya.live/backend/api/dnc/enable-disable' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
{
"status": true,
"code": 200,
"message": "DNC setting updated successfully",
"errorMessage": null,
"data": []
}
DNC (Do Not Call)
Enable/Disable DNC
Turn your organization’s DNC setting on or off.
POST
/
api
/
dnc
/
enable-disable
curl --location 'https://api.weya.live/backend/api/dnc/enable-disable' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
{
"status": true,
"code": 200,
"message": "DNC setting updated successfully",
"errorMessage": null,
"data": []
}
Overview
Turn your organization’s DNC setting on or off. While it is on, campaigns can be created or updated withenableDNC: true; while it is off, sending enableDNC: true is rejected.
This setting doesn’t decide whether numbers on the DNC list are called. Numbers on your organization’s DNC list are skipped in every campaign whether the setting is on or off. To allow a number to be called again, remove it with Remove from DNC List.
Prerequisites
- An API key for your workspace
Request
true to turn the setting on, false to turn it off. Must be a JSON boolean, not a string.curl --location 'https://api.weya.live/backend/api/dnc/enable-disable' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
Response
{
"status": true,
"code": 200,
"message": "DNC setting updated successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Enable field must be a boolean:enableis missing or nottrue/false. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
Organization not found. - 500 Internal Server Error – Unexpected server error.
Was this page helpful?

