This API allows you to update a DNC (Do Not Call) record for an authenticated user.
Endpoint
POST https://api.convoso.com/v1/dnc/update
đź”’ Authentication
Parameter Name:
auth_tokenType:
stringDescription: API Authentication Token
HTTP Method: POST
🔎 Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | API authentication token |
id | integer | Yes | DNC ID |
phone_number | string | No | DNC Phone Number |
phone_code | string | No | DNC Phone Code |
campaign_id | integer | No | DNC Campaign ID (0 for Global) |
reason | string | No | DNC Reason. Use -BLANK- to set an empty reason. |
purpose | string | No | DNC Purpose. Use -BLANK- to set an empty purpose. |
⚠️ Error Codes
| Code | Message |
|---|---|
6004 | Unknown Campaign ID |
6008 | The phone number is invalid |
6026 | Missing or invalid Country Code |
6056 | Missing or invalid value for ID |
6057 | Invalid Purpose Provided |
6058 | Invalid Reason Provided |
6059 | This combination of Phone number, Campaign ID, and Phone Code already exists. |
Example PHP Usage
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.convoso.com/v1/dnc/update');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
'auth_token' => 'bcnq1t5tt91q8199yt8wsdv4spwok5s',
'id' => 5083,
'phone_number' => '2025550185',
'phone_code' => '1',
'campaign_id' => 0,
'reason' => 'DCM Reason',
'purpose' => 'DCM Purpose'
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
Example JSON Response
{
"success": true,
"id": 5083
}
Response Field Definitions
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the request was successful. |
| id | integer | The unique ID of the DNC record that was updated. This matches the input ID. |