Skip to Content

Webhook payloads

Call completion, DNCR refusals, and campaign event payloads.

Every delivery shares the envelope. This page is the call and campaign payloads inside it.

call.completed

Fires after the call ended and its after-call work finished — so the summary and extractions are there, not pending.

FieldWhat it is
idMatches GET /v1/calls/{id}
started_at, ended_at, duration_secTiming. Null for a call that never connected
outcome, directionHow it ended, and which way it went
caller_number, platform_numberThe external party, and your number
from_number, to_numberThe same two, normalized by direction
agentA snapshot of the version that took the call — id, slug, name, version
flowThe flow the call ran in, or null
transcriptThe conversation, PII-redacted. Caller leg only
summary{id, status, text, model, error}, or null if you haven't configured one
extractionsOne entry per extraction object

On a flow call, agent is whichever member agent was holding the call when it ended. Read flow when you want to know what the caller actually reached.

A summary or extraction status is queued, running, done, or error. result is only filled in when it's done, and error is a stable token you can branch on rather than a provider message.

Transcript rows

Every row has a speaker, text, and timestamp. speaker is agent, caller, tool_call, tool_result, system, wait, or noise (caller audio we couldn't make sense of).

Ordinary spoken rows carry nothing else. The extras appear only where they apply:

FieldOn
name, is_errorTool rows: which tool, and whether it failed
dtmf_masked, digit_countKeypad entry. The digits are never published — only how many
from_agent, to_agentA handoff row: who passed the call, and who took it
speech_idAgent rows, joining the row to its latency metrics
diar_speaker, diar_segmentsCaller rows when speaker diarization is on
kindRows that aren't ordinary speech, from the list below
reasonA fixed-vocabulary explanation for a kind or a mask. Never free text

kind is one of dtmf_received (keypad entry), dtmf (a caller turn sealed from keypad input), transcription_failed, agent_handoff, or tool_interrupted (the caller barged in before the tool ran, so it never executed).

A full delivery

{
  "api_version": "2026-07-01",
  "event": "call.completed",
  "delivery_id": "018f4d7a-29ce-7c31-8ab6-4e45a6ec4b10",
  "delivered_at": "2026-09-06T10:30:00.000000+00:00",
  "test": false,
  "replayed_from_id": null,
  "campaign": null,
  "call": {
    "id": "018f4d70-80ab-7df1-8928-a5831c35d603",
    "room_name": "call-018f4d70",
    "started_at": "2026-09-06T10:24:12+00:00",
    "ended_at": "2026-09-06T10:29:43+00:00",
    "duration_sec": 331.4,
    "outcome": "completed",
    "direction": "inbound",
    "caller_number": "+971501234567",
    "platform_number": "+97145550100",
    "from_number": "+971501234567",
    "to_number": "+97145550100",
    "agent": {
      "id": "018f4d68-bb24-72c8-8bc6-12147b5989d6",
      "slug": "claims-intake",
      "name": "Claims intake",
      "version": 7
    },
    "flow": null,
    "transcript": [
      {
        "speaker": "caller",
        "text": "I need to report a collision.",
        "timestamp": 1788465779.402555
      }
    ],
    "summary": {
      "id": "018f4d7b-861c-7e10-a602-95fd08d3ba29",
      "status": "done",
      "text": "Caller reported a vehicle collision and opened a claim.",
      "model": "Summary model display name",
      "error": null
    },
    "extractions": [
      {
        "id": "018f4d7c-c76d-7680-ae32-cb7f39cb5010",
        "extraction_object_id": "018f4d65-ec64-749c-b55c-16946ff5892f",
        "name": "claim",
        "status": "done",
        "model": "Extraction model display name",
        "result": { "claim_type": "collision", "policy_number": "P-4200" },
        "error": null
      }
    ]
  }
}

call.dncr_blocked

Fires when a successful DNCR lookup confirms that the destination is registered and Sonus refuses the outbound call before dialing. Subscribe an active webhook to this event in Webhooks → Events, or pass "events": ["call.dncr_blocked"] to POST /v1/webhooks.

This subscription applies across the workspace. No agent after-call attachment is needed. It covers direct calls, scheduled jobs, campaign recipients, and the last check before a carrier leg is placed.

It does not fire when the registry lookup fails, DNCR is misconfigured, a check is clear or skipped, a job is canceled, or a check waits for the local rate limit. Those are different from a confirmed registration. Existing subscriptions stay as they are; add the event to opt in.

The envelope has event: "call.dncr_blocked", campaign: null, and a call snapshot with the usual call ID, timing and normalized phone numbers, plus:

FieldValue
outcome, failure_codeblocked, dncr_blocked
dialed, duration_secfalse, 0
dncr{"decision":"blocked","reason":"dncr_registered"}
outbound_job_id, campaign_idThe corresponding IDs, or null
transcript, summary, extractions[], null, [] — no conversation or analysis ran

agent contains the known version, with nullable fields when the call was refused before an agent was selected. A campaign recipient's campaign_id is inside call; the top-level campaign remains null because this event describes one refused attempt, not a campaign transition.

The DNCR-specific fields are absent from ordinary call.completed events. Raw registry responses and outbound variables are never included. Use the API schemas for the full payload shape.

Signing, retries, delivery history and replay work the same way as other events. Deduplicate on delivery_id: a retry uses the same stored body. Repeated finalization of one attempt does not create another delivery; a separately requested call is a separate attempt. The test-delivery button still sends a call.completed envelope with test: true and a null call to check transport and signature verification.

campaign.* events

All five campaign events share one payload:

FieldWhat it is
id, nameThe campaign
statusIts status after the transition this event announces
paused_reasonmanual, minutes_exhausted, calls_disabled, or entitlement_revoked. null when not paused
countersRecipients by status: total, pending, queued, calling, completed, failed, canceled, excluded
occurred_atWhen it happened

Worth knowing:

  • campaign.started fires when calling actually begins. Launching into a future schedule is silent until then.
  • campaign.resumed fires even when the campaign goes back to waiting on its schedule — campaign.started then fires again at activation.
  • paused_reason distinguishes a pause you made (manual) from one we made.
  • campaign.stopped is permanent.

Campaign calls still arrive as ordinary call.completed events on webhooks attached to the campaign's agent. Campaign events describe the campaign, not each call.

Consuming payloads safely

  • Branch on event, not on what's in the payload.
  • Build against the schemas in the API reference, not the illustrative values above.
  • Verify the signature before parsing, and dedupe on delivery_id — retries and replays redeliver the same logical event.

On this page