> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chat-dash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Events

> Receive call events for your voice agents, including the full post-call payload

Webhook subscriptions let you receive call events for **voice agents** (Retell, Native and Vapi) as soon as they happen. Create one with [Create Webhook Subscription](https://docs.chat-dash.com/api-reference/webhooks/pages/post-webhook-subscriptions.md), using either the agency API key or a client API key (see [Authentication](https://docs.chat-dash.com/api-reference/introduction.md#authentication)).

## Requirements

* The agent must be a **Retell, Native or Vapi** agent. Other platforms do not produce call events.
* The agent's **import webhook** must be enabled. Without it, no events are generated.
* With a client API key, the agent (or phone number) must be **assigned to that client**.

The agency dashboard shows each client's subscriptions, with a warning on any that cannot fire, under **Clients → select a client → API Access**.

## Events

| Event | Subscribed via | When it is sent |
| - | - | - |
| `call.started` | `agentIds` | A call starts |
| `call.ended` | `agentIds` | A call was answered and post-call analysis has finished. Includes the transcript, summary, recording and custom analysis. |
| `call.missed` | `agentIds` | A call was not connected or not answered (e.g. busy, no answer, voicemail) |
| `call.inbound` | `phoneNumberIds` | An inbound call arrives on a Retell or Native phone number, before it is answered |

## Delivery

* Each event is sent as an HTTP `POST` with a JSON body to your `webhookUrl`.
* Respond with any `2xx` status. A failed delivery is retried, for up to **3 attempts** in total, with a short delay between attempts. Events are not re-sent after that.
* Missed a delivery? Use [Get Latest Agent Event](https://docs.chat-dash.com/api-reference/webhooks/pages/get-agent-latest-event.md) or [List Recent Agent Events](https://docs.chat-dash.com/api-reference/webhooks/pages/get-agent-events.md) to fetch recent events, or fetch the call itself with the [Conversations](https://docs.chat-dash.com/api-reference/conversations/pages/get-conversation.md) and [Messages](https://docs.chat-dash.com/api-reference/messages/pages/get-conversations-messages.md) endpoints using `conversation._id`.

## `call.ended`

Sent once post-call analysis finishes. This is the complete record of the call.

```json theme={null}
{
  "event": "call.ended",
  "conversation": {
    "_id": "6b0dc1507e38d45d1af49fd8",
    "platformId": "call_8f2c1e6a9b",
    "channel": "inbound",
    "agentNumber": "+442071234567",
    "customerNumber": "+447700900123",
    "cost": 0.12,
    "duration": 1.5,
    "url": "https://<recording-host>/recording.wav",
    "endedReason": "user_hangup",
    "noAnswer": false,
    "summary": "Caller asked to book an appointment for Tuesday.",
    "evaluation": { "isSuccess": true },
    "sentiment": "Positive",
    "messages": [
      {
        "_id": "6b0dc1507e38d45d1af49fdc",
        "sender": "bot",
        "type": "text",
        "content": { "text": "Hello, how can I help?" },
        "createdAt": "2026-11-30T18:31:18.704Z"
      },
      {
        "_id": "6b0dc1507e38d45d1af49fdd",
        "sender": "user",
        "type": "text",
        "content": { "text": "I'd like to book an appointment for Tuesday." },
        "createdAt": "2026-11-30T18:31:19.804Z"
      }
    ],
    "customAnalysis": { "appointment_day": "Tuesday", "intent": "booking" },
    "metadata": { "patient_ref": "TEST-001" },
    "startedAt": "2026-11-30T18:31:18.604Z",
    "endedAt": "2026-11-30T18:32:48.604Z"
  }
}
```

| Field | Description |
| - | - |
| `_id` | ChatDash conversation ID. Use it with [Fetch Single Conversation](https://docs.chat-dash.com/api-reference/conversations/pages/get-conversation.md) and [Get Messages](https://docs.chat-dash.com/api-reference/messages/pages/get-conversations-messages.md). |
| `platformId` | The call's ID on the underlying voice platform |
| `channel` | `inbound`, `outbound`, `web`, `phone` or `unknown` |
| `agentNumber` / `customerNumber` | The agent's and the customer's phone numbers |
| `cost` | Call cost |
| `duration` | Call duration in **minutes** |
| `url` | Call recording URL |
| `endedReason` | Why the call ended, e.g. `user_hangup`, `agent_hangup`, `voicemail_reached` |
| `noAnswer` | `true` if the call was not answered |
| `summary` | Post-call summary |
| `evaluation.isSuccess` | Post-call success evaluation |
| `sentiment` | Caller sentiment from post-call analysis |
| `messages` | Full transcript. `sender` is `bot` (the agent) or `user` (the caller). |
| `customAnalysis` | Your agent's custom post-call analysis / extracted data. Use [Get Agent Fields Schema](https://docs.chat-dash.com/api-reference/webhooks/pages/get-agent-fields-schema.md) to discover the fields. |
| `metadata` | Dynamic variables / metadata passed into the call |
| `startedAt` / `endedAt` | Call start and end time |

> [!NOTE]
>
> The conversations API returns the same call with a few differently named fields: `phone` is the caller's number and `phoneSecondary` the other party (instead of `customerNumber` / `agentNumber` on inbound calls), `createdAt` is the call start, and the transcript is fetched separately from the Messages endpoint.

## `call.missed`

```json theme={null}
{
  "event": "call.missed",
  "conversation": {
    "_id": "6b0dc1507e38d45d1af49fe1",
    "platformId": "call_3d7a0c4f21",
    "channel": "outbound",
    "agentNumber": "+442071234567",
    "customerNumber": "+447700900123",
    "endedReason": "dial_no_answer",
    "metadata": { "patient_ref": "TEST-002" },
    "startedAt": "2026-11-30T18:40:00.000Z",
    "endedAt": "2026-11-30T18:40:31.000Z"
  }
}
```

## `call.started`

```json theme={null}
{
  "event": "call.started",
  "conversation": {
    "platformId": "call_8f2c1e6a9b",
    "channel": "inbound",
    "agentNumber": "+442071234567",
    "customerNumber": "+447700900123",
    "metadata": { "patient_ref": "TEST-001" },
    "startedAt": "2026-11-30T18:31:18.604Z"
  }
}
```

`call.started` has no `_id` yet; match it to the later `call.ended` with `platformId`.

## `call.inbound`

Sent for phone-number subscriptions before an inbound call is answered. A phone number can have only one `call.inbound` subscription.

```json theme={null}
{
  "event": "call.inbound",
  "agentNumber": "+442071234567",
  "customerNumber": "+447700900123"
}
```

Unlike the other events, ChatDash waits for your response (up to 30 seconds) and uses the JSON you return to set up the inbound call, so respond quickly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.