Skip to main content
POST
/
api
/
dnc
/
enable-disable
curl --location '{{baseUrl}}/api/dnc/enable-disable' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "enable": true
  }'
{
  "message": "DNC setting updated successfully",
  "status": true,
  "code": 200,
  "errorMessage": ""
}

Overview

Control whether the DNC (Do Not Call) feature is active for your organization. When enabled, the system will respect DNC entries and prevent calling numbers in the list. When disabled, DNC checks are bypassed.

Prerequisites

  • Bearer token for authenticated workspace access
  • Organization membership (automatically determined from your user account)

Request

Authorization
string
required
Bearer token for the authenticated workspace account.
enable
boolean
required
Set to true to enable DNC functionality, or false to disable it.
curl --location '{{baseUrl}}/api/dnc/enable-disable' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "enable": true
  }'

Response

{
  "message": "DNC setting updated successfully",
  "status": true,
  "code": 200,
  "errorMessage": ""
}
message
string
required
Success message confirming the DNC setting was updated.
status
boolean
required
Indicates whether the operation was successful.
code
integer
required
HTTP status code (200 for success).

Error Handling

  • 400 Bad Request – Missing enable field or enable is not a boolean value.
  • 404 Not Found – No users found for this organization.
  • 500 Internal Server Error – Server error while updating the DNC setting.
When DNC is enabled:
  • The system checks the DNC list before making outbound calls
  • Numbers in the DNC list will be skipped automatically
  • This helps maintain compliance and respect customer preferences
When DNC is disabled:
  • DNC checks are bypassed
  • All numbers, including those in the DNC list, may be called
  • Use with caution to ensure compliance with regulations

Authorizations

Authorization
string
header
required

Bearer token authentication for workspace access

Body

application/json
enable
boolean
required
Example:

true

Response

DNC setting updated successfully