Skip to main content
POST
/
api
/
dnc
/
add
curl --location '{{baseUrl}}/api/dnc/add' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "phoneNumber": "12125551234",
    "batchId": "64e5f12345abcdef98765432",
    "requestUUID": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customer_request"
  }'
{
  "message": "Phone number added to DNC successfully",
  "status": true,
  "code": 200,
  "errorMessage": ""
}

Overview

Add a phone number to your organization’s Do Not Call (DNC) list. Once added, this number will be excluded from future outbound calling campaigns. The system automatically sends a notification email to the organization admin when a number is added to the DNC list.

Prerequisites

  • Bearer token for authenticated workspace access
  • Valid batchId that exists in your workspace
  • Valid requestUUID from a call record in the specified batch

Request

Authorization
string
required
Bearer token for the authenticated workspace account.
phoneNumber
string
required
Phone number to add to the DNC list with country code (e.g., “12125551234”). The + prefix is optional.
batchId
string
required
ID of the batch associated with the call that triggered this DNC request.
requestUUID
string
required
Unique identifier (UUID) of the specific call record from the batch’s phone logs.
type
string
Optional classification for the DNC entry (e.g., “customer_request”, “complaint”, etc.).
curl --location '{{baseUrl}}/api/dnc/add' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "phoneNumber": "12125551234",
    "batchId": "64e5f12345abcdef98765432",
    "requestUUID": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customer_request"
  }'

Response

{
  "message": "Phone number added to DNC successfully",
  "status": true,
  "code": 200,
  "errorMessage": ""
}
message
string
required
Success message confirming the phone number was added to the DNC list.
status
boolean
required
Indicates whether the operation was successful.
code
integer
required
HTTP status code (200 for success).

Error Handling

  • 400 Bad Request – Missing required fields (phoneNumber, batchId, or requestUUID), or phone number already exists in DNC for this organization.
  • 404 Not Found – Batch not found, user not found for the batch, or call record not found for the given batchId and requestUUID.
  • 500 Internal Server Error – Server error while processing the request.
When a phone number is added to the DNC list, the system automatically:
  • Links the DNC entry to your organization
  • Associates it with the batch and call record
  • Stores call recording and transcription data (if available)
  • Sends an email notification to your organization’s admin

Authorizations

Authorization
string
header
required

Bearer token authentication for workspace access

Body

application/json
phoneNumber
string
required
Example:

"12125551234"

batchId
string
required
Example:

"64e5f12345abcdef98765432"

requestUUID
string
required
Example:

"some-unique-uuid"

type
string
Example:

"manual"

Response

Phone number added to DNC successfully