Skip to main content

Overview

Voice API webhooks are HTTP callbacks that notify your application in real time when events occur during a call — a call is initiated, audio playback finishes, a recording is saved, and so on. Your application receives a JSON payload for each event and can respond with call control commands to drive the call flow.

Webhook delivery

When an event occurs on a call, Telnyx delivers the webhook to your configured URL. If the primary URL fails, the webhook is sent to the failover URL (if configured). For details on retry logic, signature verification, and general webhook behavior, see Webhook Fundamentals.

Configuration

Webhooks can be configured at three levels:
  1. Connection webhook config — default webhook URL and settings tied to a Voice API connection in Mission Control.
  2. Custom webhook config — per-command overrides. Pass webhook_url and webhook_url_method in any call control command to route that command’s webhooks to a different endpoint.
  3. Events webhook config — advanced configuration that routes specific event types to different URLs.
You can also manage webhook settings programmatically via the Call Control Applications API. Use Create or Update to set webhook URLs, failover URLs, API version, and timeout values on a connection.

Configuration parameters

HTTP methods and headers

Methods

  • Webhooks use the POST method by default. Pass webhook_url_method as GET in a call control command to receive that command’s webhook payloads as URL query parameters instead of a JSON body.

Headers

Every webhook request includes:

Webhook payload structure

All Voice API webhooks share a common envelope. Below is an example call.initiated payload:

Common fields

Event types

The following event types are fired by the Voice API. Each event type appears in the event_type field of the webhook payload.

Call state

Audio playback

DTMF and gather

Recording

Answering machine detection (AMD)

Media forking

Queue

Transcription

Streaming

Response codes

Your webhook endpoint’s HTTP response determines whether delivery is considered successful:

Debugging deliveries

Use the Webhook Deliveries API to inspect delivery history for your account. You can filter by status, event type, and time range — useful for diagnosing missed or failed webhooks.
Each delivery record includes the full webhook payload, HTTP status codes, and attempt-level details (request/response headers and bodies). See Get a webhook delivery for the full response schema.

Best practices

  1. Return 2xx immediately — acknowledge receipt within a few seconds, then process asynchronously.
  2. Implement idempotency — webhooks may be delivered more than once. Use the event id to deduplicate.
  3. Verify signatures — validate the Telnyx-Signature-Ed25519 header to confirm webhook authenticity. See Webhook signing.
  4. Use command_id — include a command_id in your call control commands to prevent duplicate command processing. Commands with duplicate IDs within 60 seconds are ignored.
  5. Monitor failures — track failed webhook deliveries and configure a failover URL for critical applications.