Requests and responses
Requests
Section titled “Requests”- Method:
POSTtohttps://api.dcdial.com/api/. HTTPS only. - Body:
application/x-www-form-urlencodedfields. Usemultipart/form-datato upload a file. A JSON object also works withContent-Type: application/json. - Required fields:
type(the operation) and, except for Log in,token. - Field names are case-sensitive and use
snake_case. - Dates are
YYYY-MM-DD; date-times areYYYY-MM-DD HH:MM:SS. - Yes/no flags are
Y/Nor1/0, as shown on each endpoint. - Lists of values (such as several phone numbers) are comma-separated unless the endpoint says otherwise.
Responses
Section titled “Responses”Responses are JSON. Most endpoints wrap their data in a response object with a success flag:
{ "response": { "success": "1", "error": "", "campaigns_list": [ … ] }}successis1on success and0on failure. Depending on the endpoint it can be a number or a string, so compare loosely (success == 1) or convert it first.errorholds a readable message whensuccessis0.- A few newer endpoints, such as Fetch accounts, return their data without the
responsewrapper. Each reference page shows the exact shape.
Paging
Section titled “Paging”Endpoints that return long lists take limit and offset. Request a page, then raise offset by limit until you
get fewer rows than limit.
Idempotency and retries
Section titled “Idempotency and retries”The API has no idempotency keys. Retrying a request that starts a campaign, sends a text or takes a payment can do it twice. Only retry those after you have confirmed the first attempt failed, for example with Get payment status.