v50

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-06-16122182589.7 KB
Call webhooks

On-call event

Sends a notification to track the lifecycle of an active call.status updates. It's triggered when a call is initiated, answered, and ends.

postWebhookOnCallEvent

Payload

uuidstring uuid required

Call ID. Deprecated — use id instead.

idstring uuid required

Call ID. Alias of uuid.

direction'inbound' | 'outbound'

Direction of the call. One of inbound (call received by the account) or outbound (call placed by the account).

event_type'call_setup' | 'ringing' | 'early_media' | 'answered' | 'completed' | 'busy' | 'cancelled' | 'rejected' | 'on_call_event' required

Most recent lifecycle event for the call. One of:

  • call_setup — the call is being initiated.
  • ringing — the destination is ringing.
  • early_media — early media (such as ringback) is playing before answer.
  • answered — the destination answered the call.
  • completed — the call ended normally.
  • busy — the destination was busy.
  • cancelled — the call was cancelled before answer.
  • rejected — the destination rejected the call.
  • on_call_event — an in-call event occurred (see event_payload).
event_timestring date-time required

Date and time of the latest event in ISO 8601 format.

fromstring required

Caller ID.

tostring required

Destination number.

call_startedstring date-time required

Date and time when the call started in ISO 8601 format.

call_answeredstring date-time nullable required

Date and time when the call was answered in ISO 8601 format.

call_completedstring date-time nullable required

Date and time when the call ended in ISO 8601 format.

machine_detectedboolean required

Indicates whether the call was answered by a machine.

tagstring required

Call metadata

Example payload

{
  "uuid": "5dccb6b0-f35c-488c-867b-86fb012c4415",
  "id": "5dccb6b0-f35c-488c-867b-86fb012c4415",
  "event_type": "call_setup",
  "event_time": "2025-09-22T12:56:38.547Z",
  "event_payload": {
    "type": "audio",
    "payload": {
      "status": "completed",
      "playback_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  },
  "from": "+18045961058",
  "to": "17653889567",
  "call_started": "2025-09-22T12:56:38.547Z",
  "tag": "marketing-campaign"
}

Response

Return a 200 status to indicate that the data was successfully received