Connect your CRM
Build six endpoints in your CRM. Qdial on the agent's phone calls them directly over HTTPS. This contract is a draft (version 0.2.0) and may change before the first release.
Before you start
HTTPS only
The app refuses plain http addresses.
JSON, UTC, E.164
JSON bodies, times like 2026-11-28T04:35:00Z, phones like +919876543210.
One base URL
All endpoints sit under one address, for example https://yourcrm.com/qdial-api. Agents type this as the CRM address.
Integration steps
Add a "Pair phone" button in your web panel
For the signed-in agent, create a random 6-digit code valid for about 10 minutes and usable once. Show the code and your base URL.
Build
POST /pairCheck the code, create a long random token, store its hash with the agent id and
device_id, and return the token with the agent's name.Check the token on every other call
Read
Authorization: Bearer <token>. If it is missing or revoked, answer401; the app then wipes its pairing and asks for a new code.Build
GET /meReturn the agent's name and today's call counts. Optionally return your own list of outcomes for the sheet shown after a call.
Build
GET /leads/nextReturn the next leads in calling order and lock them to this agent for about 15 minutes, so two phones never get the same lead.
Build
POST /callsStore the call result. If you already hold the same
client_call_id, change nothing and answer200with"duplicate": true. The phone retries when it was offline.Build
POST /unpairand a "Remove phone" buttonEither side can end the pairing. Removing a phone in your panel should revoke its token.
Test with the app
Pair a phone with your base URL, make one call, and confirm the result arrives once, including after switching the phone to flight mode and back.
Field mapping
Qdial keeps a small neutral lead model. Map your CRM's fields to these names.
| Qdial field | Meaning | Typical CRM field |
|---|---|---|
id | Your lead id, returned to you with the call result | Lead id |
name | Shown before and during the call | Contact or business name |
phone | Number to call, E.164 | Mobile |
stage | Free text, shown as is | Status, pipeline stage |
notes | Last note, shown before the call | Latest remark |
last_contact_at | When the lead was last contacted | Last activity time |
Examples
Pair
curl -X POST https://yourcrm.com/qdial-api/pair \
-H "Content-Type: application/json" \
-d '{"code":"482913","device_id":"9f2c1a7b5d3e4f60812a4c6e8b0d2f41"}'
{"token":"qd_live_3f9a...","agent":{"id":"17","name":"Priya S"}}
Report a call
curl -X POST https://yourcrm.com/qdial-api/calls \
-H "Authorization: Bearer qd_live_3f9a..." \
-H "Content-Type: application/json" \
-d '{
"client_call_id":"5b0f6c2e-8d1a-4e77-9a53-0c1d2e3f4a5b",
"lead_id":"90211",
"phone":"+919876543210",
"started_at":"2026-11-28T04:35:00Z",
"duration_seconds":96,
"status":"answered",
"outcome":"interested",
"note":"Send brochure",
"next_call_at":"2026-11-30T05:30:00Z"
}'
{"ok":true,"duplicate":false}
Errors
{"error":{"code":"invalid_code","message":"This code is wrong or has expired."}}
The app shows message to the agent, so keep it short and plain.