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:- Connection webhook config — default webhook URL and settings tied to a Voice API connection in Mission Control.
- Custom webhook config — per-command overrides. Pass
webhook_urlandwebhook_url_methodin any call control command to route that command’s webhooks to a different endpoint. - Events webhook config — advanced configuration that routes specific event types to different URLs.
Configuration parameters
HTTP methods and headers
Methods
- Webhooks use the
POSTmethod by default. Passwebhook_url_methodasGETin 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 examplecall.initiated payload:
Common fields
Event types
The following event types are fired by the Voice API. Each event type appears in theevent_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.Best practices
- Return 2xx immediately — acknowledge receipt within a few seconds, then process asynchronously.
- Implement idempotency — webhooks may be delivered more than once. Use the event
idto deduplicate. - Verify signatures — validate the
Telnyx-Signature-Ed25519header to confirm webhook authenticity. See Webhook signing. - Use
command_id— include acommand_idin your call control commands to prevent duplicate command processing. Commands with duplicate IDs within 60 seconds are ignored. - Monitor failures — track failed webhook deliveries and configure a failover URL for critical applications.