Campaign summary
Returns live statistics for one running campaign.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
campaign_summaryfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
ID of the campaign.
Example1024
curl https://api.dcdial.com/api/ \ -d type=campaign_summary \ -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' => 'campaign_summary', '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: "campaign_summary", 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": "campaign_summary", "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": { "pace_method": "PREDICTIVE", "pace_tempo": "1.5", "intensity_throttle": "0", "agent_level": "1", "caller_id": "5559876543", "campaign_script": "Default Script", "recording": "ALLCALLS", "contact_schedule": "Default Customer Schedule", "total_leads": "1200", "active_leads": "840", "remaining_leads": "512", "percentage_complete": "57.3", "answered_today": "214", "called_today": "688", "percentage_dropped": "1.2", "average_wrap_time": "00:00:18", "average_call_interval": "00:00:42", "average_talkoff_time": "00:02:35", "average_no_of_agents": "6", "active_calls": "9", "calls_ringings": "5", "calls_waiting": "1", "calls_in_ivr": "2", "total": "8", "ready": "2", "oncalls": "5", "wrappingup": "1", "paused": "0", "dead": "0", "active": "Y", "display_status": "PLAY", "scheduler_status": "N", "success": "1", "error": "" }}Try it