Get campaign settings
Returns a campaign’s settings (dial method, caller ID, calling hours, answering-machine detection, recording and more), each with its current value and the allowed options.
Use the backendValue of an option when you call Update campaign.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
get_campaign_settingsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
ID of the campaign.
Example1024
curl https://api.dcdial.com/api/ \ -d type=get_campaign_settings \ -d token="$DCDIAL_TOKEN" \ -d campaign_id=1024<?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' => 'get_campaign_settings', 'token' => getenv('DCDIAL_TOKEN'), 'campaign_id' => 1024, ]),]);$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: "get_campaign_settings", token: process.env.DCDIAL_TOKEN, campaign_id: "1024", }),});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": "get_campaign_settings", "token": os.environ["DCDIAL_TOKEN"], "campaign_id": 1024, }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "success": 1, "error": "", "dial_method": [ { "current_value": [ { "backendValue": "BROADCAST", "frontendValue": "BROADCAST" } ], "options": [ { "backendValue": "BROADCAST", "frontendValue": "BROADCAST" }, { "backendValue": "PREDICTIVE", "frontendValue": "PREDICTIVE" } ] } ], "campaign_recording": [ { "current_value": [ { "backendValue": "NEVER", "frontendValue": "OFF" } ], "options": [ { "backendValue": "NEVER", "frontendValue": "OFF" }, { "backendValue": "ALLCALLS", "frontendValue": "ON" } ] } ], "auto_dial_level": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "0", "frontendValue": "0" }, { "backendValue": "0.1", "frontendValue": "0.1" } ] } ], "adaptive_dropped_percentage": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "0", "frontendValue": "0" }, { "backendValue": "100", "frontendValue": "100" } ] } ], "local_call_time": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "ccsDefault10311", "frontendValue": "Default Customer Schedule" } ] } ], "sms_templates": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "smstFPah7OteLjF7C10311", "frontendValue": "Business Loan Offer" } ] } ], "campaign_type": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [] } ], "amd_send_to_vmx": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [] } ], "cpd_amd_action": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [] } ], "adaptive_intensity": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "0", "frontendValue": "0" }, { "backendValue": "40", "frontendValue": "40 - More Intense" } ] } ], "amd_status": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "Y", "frontendValue": "ON" }, { "backendValue": "N", "frontendValue": "OFF" } ] } ], "msg_status": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "Y", "frontendValue": "ON" }, { "backendValue": "N", "frontendValue": "OFF" } ] } ], "adaptive_dl_diff_target": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "0", "frontendValue": "0" }, { "backendValue": "40", "frontendValue": "40 - Calls Waiting for Agents" } ] } ], "campaign_script": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "scro7FDjtAtyOQzC10311", "frontendValue": "Default Script" } ] } ], "call_back_number": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "5550100123", "frontendValue": "5550101123" } ] } ], "use_custom_cid": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "Y", "frontendValue": "ON" }, { "backendValue": "N", "frontendValue": "OFF" } ] } ], "campaign_cid": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "5550102123", "frontendValue": "5550103123" } ] } ], "regional_cidlist_id": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" } ] } ], "ext_queue_status": [ { "current_value": [ { "backendValue": "N", "frontendValue": "N" } ], "options": [ { "backendValue": "Y", "frontendValue": "ON" }, { "backendValue": "N", "frontendValue": "OFF" } ] } ], "queues": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" } ] } ], "ext_queues": [ { "current_value": [ { "backendValue": "", "frontendValue": "" } ], "options": [ { "backendValue": "", "frontendValue": "None" }, { "backendValue": "5550104123", "frontendValue": "5550105123" } ] } ], "number_of_lines": [ { "current_value": [ { "backendValue": "0", "frontendValue": "0" } ], "options": [ { "backendValue": "0", "frontendValue": "0" }, { "backendValue": "1", "frontendValue": "1" } ] } ], "dial_prefix": [ { "current_value": [ { "backendValue": "9", "frontendValue": "OFF" } ], "options": [ { "backendValue": "8", "frontendValue": "ON" }, { "backendValue": "9", "frontendValue": "OFF" } ] } ] }}Try it