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

# Events

> Every event Oktivo emits, how to receive it, and how to look it up later.

Oktivo records an event whenever something happens to a call. You can receive events in real time with [webhooks](https://docs.oktivo.com/concepts/webhooks.md), and read them back at any time from the event log, which keeps 30 days of history whether or not a webhook was subscribed.

## Event envelope

```json theme={null}
{
  "id": "contact_7f8a9b0c1d2e:call.initiated:1",
  "version": "1.0",
  "type": "call.initiated",
  "timestamp": "2026-03-02T04:00:03.120Z",
  "data": {
    "contactUID": "contact_7f8a9b0c1d2e",
    "phone": "+919876543210",
    "campaignUID": "api_call_3e4f5g6h7i8j",
    "agentId": "agt_123",
    "orgUID": "org_abc",
    "name": "Priya Sharma",
    "kind": "api",
    "source": "queue",
    "deferredCallId": "dfc_9fQ2xK1mZp",
    "roomName": "room-1a2b3c4d"
  }
}
```

`contactUID`, `phone`, `campaignUID`, `agentId` and `orgUID` are present on every event. The `id` is the same in the webhook, the event log and the delivery log.

## Catalog

Fetch the live catalog, with descriptions and example fields, from `GET /api/v1/crm/events/types`.

### Queue and scheduling

| Event | Fires when |
| - | - |
| `call.scheduled` | A call was accepted for a future `scheduledAt`. Adds `deferredCallId`, `reason`, `scheduledFor`, `notBefore`, `expiresAt`. |
| `call.queued` | A call could not be placed now (window closed or voice service unavailable) and was queued with `deferIfUnavailable`. Same fields as `call.scheduled`. |
| `call.queue_failed` | A queued or scheduled call will not be placed: expired, no credits, Do Not Disturb, and so on. Adds `outcome` and `detail`. |
| `call.cancelled` | A queued, scheduled or pending call was cancelled. Adds `cancelledBy`, `previousStatus`. |

### Dialing

| Event | Fires when |
| - | - |
| `call.initiated` | The call was handed to the dialer; for queued calls, when it leaves the queue. Adds `name`, `kind`, `source` (`direct` or `queue`), `deferredCallId`, `roomName`. The phone may not be ringing yet. |

### After the call

| Event | Fires when |
| - | - |
| `call.ended` | The call disconnected. Always fires. |
| `call.transcription_ready` | The transcription is available. |
| `call.analysis_ready` | AI analysis is complete. |
| `call.recording_ready` | The recording is available (presigned URL, 7 days). |
| `call.completed` | Everything above is ready. |
| `call.metrics_ready` | Call metrics are available. |

## Receive events with a webhook

Subscribe an endpoint to the types you need, or to `"*"` for every current and future event:

```json theme={null}
{ "url": "https://example.com/oktivo", "eventTypes": ["call.scheduled", "call.initiated", "call.completed"] }
```

In the dashboard, open **Tools → Add webhook**; events are grouped and described in the picker.

## Read the event log

| Endpoint | Purpose |
| - | - |
| `GET /api/v1/crm/events` | List events, newest first. Filters: `type` (comma list), `group` (`queue`, `dialing`, `post_call`), `contactUID`, `deferredCallId`, `campaignUID`, `agentId`, `phone`, `source`, `from`, `to`, `page`, `pageSize`. |
| `GET /api/v1/crm/events/{id}` | One event with the webhook deliveries it produced. |
| `GET /api/v1/crm/events/types` | The event catalog. |

In the dashboard: **Monitor → Logs → Events**.

The event log stores `data` without bulky or secret fields: the transcript is replaced by a turn count and recording URLs are not kept (`recordingAvailable` is set instead). Webhooks always carry the full payload.

## Stability

Event `type` values never change. Fields may be added without a version bump, so ignore fields you do not know. A breaking change to an event's payload bumps its `version`.


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