Fetch accounts
Lists the accounts in your company, with either every phone number and email per account or just the primary ones.
This endpoint returns its data without the response wrapper.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
fetch_accountsfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
Your DCDial company ID.
Example1011 to return every phone number per account, 0 for the primary only.
One of011 to return every email address per account, 0 for the primary only.
One of01
curl https://api.dcdial.com/api/ \ -d type=fetch_accounts \ -d token="$DCDIAL_TOKEN" \ -d company_id=101<?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' => 'fetch_accounts', 'token' => getenv('DCDIAL_TOKEN'), 'company_id' => 101, ]),]);$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: "fetch_accounts", token: process.env.DCDIAL_TOKEN, company_id: "101", }),});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": "fetch_accounts", "token": os.environ["DCDIAL_TOKEN"], "company_id": 101, }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "success": 1, "company_id": 10111, "accounts": [ { "id": "51187", "accountid": "2026-1111", "source_id": "", "title": "Mr", "first_name": "John", "middle_initial": null, "last_name": "Smith", "address1": "", "address2": "", "address3": "", "city": "", "state": "AK", "postal_code": "", "balance": "0.00", "gender": "U", "birthday": "0000-00-00", "country": "US", "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "custom6": "", "custom7": "", "custom8": "", "custom9": "", "custom10": "", "custom11": "", "custom12": "", "custom13": "", "custom14": "", "custom15": "", "custom16": "", "custom17": "", "custom18": "", "custom19": "", "custom20": "", "clusterid": "10217", "created_date": "2026-03-31 07:22:31", "updated_date": "2026-03-31 07:22:31", "last_contacted_date": "0000-00-00 00:00:00", "job_title": "", "sm_facebook": null, "sm_twitter": null, "sm_linkedin": null, "company_name": null, "company_website": null, "company_phones": null, "last_activity_date": "0000-00-00 00:00:00", "country_code": "", "phone": "5550106123", "description": "", "account_status": "new_account", "timezone": null, "name": "", "verification_code": null, "expiry_time": null, "password": null, "contact_source": "web", "profile_photo": "N", "time_zone_id": "0", "is_blocked": "N", "phones": [ { "id": 7, "phone_number": "5550107123", "phone_type": "HOME" } ], "emails": [ { "id": 15746, } ] } ]}Try it