Lead push
Your CRM callsPOST /api/v1/leads (or /events). Ondial does not pull CRM contacts for the Public API path unless you also use dashboard CRM integrations separately.
On accept, Ondial fires a lead webhook (when subscribed):
Finished contacts need
requeue: true (otherwise 422 requeue_required). Each successful requeue arms a new dial and later emits a new set of call webhooks under a new callId.
Inbound CRM read
After wiring Sheets / Zoho / Custom API on an inbound agent (dashboard or HMS inbound APIs), callPOST /api/v1/inbound-agents/{id}/crm/lookup to look up order/person data with your API key (no live call).
Hospital platforms that own doctors and booking: Healthcare HMS integration. Use your branchId / doctorId and HTTPS webhook - not sample placeholder IDs.
Event catalog
Register an HTTPS URL viaPOST /api/v1/webhooks or API Access → Notifications. Ondial posts signed events:
Outbound
outbound.lead.createdoutbound.lead.updated(action:updated|requeued)call.outbound.status(legacy:call.status)call.outbound.billedcall.outbound.analysis(legacy:call.analysis,analytics.call)whatsapp.outbound.status(legacy:whatsapp.status)email.outbound.status(legacy:email.status)followup.scheduledcontact.cancelled
call.inbound.startedcall.inbound.completed(usuallybillingStatus: pending)call.inbound.billedcall.inbound.analysiswhatsapp.inbound.receivedinbound.lead.created
credits.usage- wallet ledger push after a successful deduct (paired withcall.*.billed)
Outbound dial lifecycle (typical order)
For one dial attempt (including after requeue), CRM listeners usually see:outbound.lead.createdoroutbound.lead.updated- at ingest / requeue time- After hangup / charge -
call.outbound.billedandcredits.usage call.outbound.status- e.g.completedcall.outbound.analysis- when post-call AI analysis is ready (may lag a few seconds)
callId (or conversationId) per dial. Do not assume one contact = one call forever - requeues create new call rows and new webhook sets.
Matching events to your CRM leads
Send your own lead id asleadId when you push the lead (see Push leads). Ondial then includes the same leadId in:
leadId is returned exactly as you sent it (177 stays a number). It is left out when the lead was sent without one, so keep using contactId as a fallback.
Callback requests in call.outbound.analysis
When the lead asks to be called back, data.nextAction has type: "Callback" plus a resolved date and time, so your CRM doesn’t have to interpret phrases like “tomorrow afternoon”:
All other calls keep the usual
nextAction shape (type, action, priority) with no date or time.
Delivery, retries, idempotency
Envelope:X-Ondial-Signature- HMAC-SHA256 hex of the raw body with your webhook secretX-Ondial-Event- event typeX-Ondial-Idempotency-Key- stable delivery key (also used server-side to avoid double POSTs)
- Same logical event is delivered once per webhook URL when the prior delivery succeeded.
- Call events key on event +
callId(plus status / bill identity). Each new dial → newcallId→ new deliveries. - Lead update/requeue keys on event + contact +
action+scheduledAt, so eachrequeue: truecan fire again. - Failed POSTs (4xx/5xx / network) retry up to 3 times with short backoff; a later successful retry updates the same delivery log.
- Return 2xx quickly. Rate limits (429) or tunnel errors (502) on your side look like “missing” events even when Ondial sent them.
*.billed / credits.usage plus poll GET /api/v1/credits/transactions. See Usage & call analytics.
Dashboard CRM OAuth (HubSpot, Shopify, etc.) remains a separate product path - not part of public campaign CRUD.
