Skip to main content
This documents the v1 product. It is kept for integrations already running on it. If you are building something new, start with the Quickstart.
Voice Agents sends webhooks to tell your application about the state of every call in real time. When a call connects, fails or triggers an action such as creating an order, your configured callback URL receives an event payload.

Call Lifecycle

Every call moves through the lifecycle below, and each stage fires an event.

Lifecycle Events

These events follow a successful call from start to finish.

Failure & Retry Events

If a call can’t be connected, one of these events fires. The system may retry automatically, depending on your campaign settings.

Other Events

When all retry attempts are used up, we send call.lifecycle-ended to signal that no more attempts will be made for this call task.

Webhook Payload Structure

Every webhook event uses the same envelope.

Key Fields

  • metadata: The custom JSON object you passed when initiating the call. It comes back in every event, so you can link calls to your internal records (e.g., userId, orderId).
  • event.type: The event name (e.g., call.in-progress, end-of-call).
  • event.data: The payload specific to the event.

Special Payloads

Some events contain additional data in event.data.

end-of-call

Contains the AI analysis, summary, and credit usage.

call.lifecycle-ended

Contains a report of all attempts.

Actions

Actions are events the AI sends during the conversation when your system needs to do something, such as create an order or send a message.

create_order

Fires when the AI decides that the customer wants to place an order and has given all the details it needs.

send_whatsapp

Fires when the AI can’t complete a task, such as creating an order, because information is missing. It triggers a fallback message on WhatsApp.

Handling Webhooks

This example handles these events in a Node.js Express application.

Security

To confirm that a webhook really came from Voice Agents, verify the signature in its headers. See Webhook Signature Verification for implementation details.

The same thing in v2

v2 keeps most of this design. It still sends one event per state change, and each event comes in an envelope you acknowledge with 200 and carries a signature you verify. The event names are different. Retries and actions did not carry over to v2, and the analysis is not built yet. metadata works differently. v1 echoes your object back on every event. v2 returns the call_id in the 202 response to POST /v2/calls. Store it against your own record before the first event can arrive, and use it to match events to that record. The variables you pass when you create the call go into the prompt and do not come back on the event. For the full reference, see v2 Webhooks.