Qdial
Developers

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.

Ground rules

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.

Step by step

Integration steps

  1. 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.

  2. Build POST /pair

    Check 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.

  3. Check the token on every other call

    Read Authorization: Bearer <token>. If it is missing or revoked, answer 401; the app then wipes its pairing and asks for a new code.

  4. Build GET /me

    Return the agent's name and today's call counts. Optionally return your own list of outcomes for the sheet shown after a call.

  5. Build GET /leads/next

    Return the next leads in calling order and lock them to this agent for about 15 minutes, so two phones never get the same lead.

  6. Build POST /calls

    Store the call result. If you already hold the same client_call_id, change nothing and answer 200 with "duplicate": true. The phone retries when it was offline.

  7. Build POST /unpair and a "Remove phone" button

    Either side can end the pairing. Removing a phone in your panel should revoke its token.

  8. 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.

Data model

Field mapping

Qdial keeps a small neutral lead model. Map your CRM's fields to these names.

Qdial fieldMeaningTypical CRM field
idYour lead id, returned to you with the call resultLead id
nameShown before and during the callContact or business name
phoneNumber to call, E.164Mobile
stageFree text, shown as isStatus, pipeline stage
notesLast note, shown before the callLatest remark
last_contact_atWhen the lead was last contactedLast activity time
Copy and paste

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.

Swagger

API reference