Search accounts and call log
Searches accounts and the call log by phone number, account, name, date and other details.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
search_leadfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
Free-text search (name, phone or account).
ExampleDoeDate to search (YYYY-MM-DD).
Start of a date range (YYYY-MM-DD).
End of a date range (YYYY-MM-DD).
Look back this many days.
Filter by call type (for example inbound or outbound).
Filter by the agent username.
Filter by account holder name.
Filter by flag.
Filter by call status.
curl https://api.dcdial.com/api/ \ -d type=search_lead \ -d token="$DCDIAL_TOKEN" \ -d query=Doe \ -d search_date=value \ -d from=value<?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' => 'search_lead', 'token' => getenv('DCDIAL_TOKEN'), 'query' => 'Doe', 'search_date' => 'value', 'from' => 'value', ]),]);$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: "search_lead", token: process.env.DCDIAL_TOKEN, query: "Doe", search_date: "value", from: "value", }),});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": "search_lead", "token": os.environ["DCDIAL_TOKEN"], "query": "Doe", "search_date": "value", "from": "value", }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "success": 1, "footer": "0", "error": "", "all_log_search": [ { "uniqueid": "1555005158.1906", "lead_id": "1230291(5550108123)", "list_id": "222210311", "call_date": "04/11/19 01:52 PM", "full_name": "John Smith", "status": "DROP", "call_type": "OUTBOUND", "campaign_id": "cmpc4IZsWz1z77dC10311", "flag": "0", "phone_number": "5550109123", "campaign_name": "Payment Predictive", "list_name": "Default Outbound List" }, { "uniqueid": "1555005132.1903", "lead_id": "1230290(5550110123)", "list_id": "222210311", "call_date": "04/11/19 01:52 PM", "full_name": "John Smith", "status": "INCALL", "call_type": "OUTBOUND", "campaign_id": "cmpc4IZsWz1z77dC10311", "flag": "0", "phone_number": "5550111123", "campaign_name": "Payment Predictive", "list_name": "Default Outbound List" } ] }}Try it