Remove a number from Do-Not-Call
Removes a phone number from your Do-Not-Call list. Pass the same campaign_id you used when adding it.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
delete_dncfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
Phone number to unblock.
Example5550100123Remove the block for this campaign only.
Example1024
Notes
Only remove a number when you are sure the person has agreed to be contacted again.
curl https://api.dcdial.com/api/ \ -d type=delete_dnc \ -d token="$DCDIAL_TOKEN" \ -d phone_number=5550100123<?php$ch = curl_init('https://api.dcdial.com/api/');curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => http_build_query([ 'type' => 'delete_dnc', 'token' => getenv('DCDIAL_TOKEN'), 'phone_number' => '5550100123', ]),]);$result = json_decode(curl_exec($ch), true);curl_close($ch);
if (($result['response']['success'] ?? 0) != 1) { throw new RuntimeException($result['response']['error'] ?? 'Request failed');}const res = await fetch('https://api.dcdial.com/api/', { method: 'POST', body: new URLSearchParams({ type: "delete_dnc", token: process.env.DCDIAL_TOKEN, phone_number: "5550100123", }),});const { response } = await res.json();if (response.success != 1) throw new Error(response.error);import osimport requests
r = requests.post( "https://api.dcdial.com/api/", data={ "type": "delete_dnc", "token": os.environ["DCDIAL_TOKEN"], "phone_number": "5550100123", }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "success": 1, "error": "" }}Try it