Skip to main content
This page is the technical reference for VoiceInfra webhook events — covering the full payload schema, request headers, signature verification, and delivery behaviour. If you are looking for instructions on how to configure your webhook endpoint and view delivery logs, see the Webhooks Setup Guide.

Delivery

VoiceInfra delivers webhook events by sending an HTTP POST request to the URL you configure in your dashboard. Events fire when a call ends (hang up), regardless of the call outcome.
Respond to webhook requests with HTTP 200 as quickly as possible. Move any time-consuming processing (database writes, third-party API calls) to a background job to avoid timeouts that trigger unnecessary retries.

Request headers

Every webhook delivery includes the following HTTP headers:

Payload schema

string
Unique identifier for the call. Use this to correlate the webhook event with the call_id returned when you initiated the call via POST /calls/outbound.
string
Event type. Currently always call.completed.
string
The caller’s phone number in E.164 format.
string
The called phone number in E.164 format.
string
The ID of the AI agent that handled the call.
integer
Total call duration in seconds, from answer to hang-up.
string
ISO 8601 timestamp for when the call started.
string
ISO 8601 timestamp for when the call ended.
string
One of answered, voicemail, or failed.
string
URL to the call recording audio file. The file is available for download shortly after the call ends.
string
Full conversation transcript with speaker labels (for example, Agent: and Caller:).
string
AI-generated summary of the call — a concise description of what was discussed and any outcomes reached.
object
Key data points extracted by the AI during the call. The fields present in this object vary based on your agent’s configuration. For example, a lead qualification agent might extract {"lead_score": 8, "interested": true}.

Example payload

call.completed payload

Signature verification

VoiceInfra signs every webhook payload with HMAC-SHA256 using the webhook secret you set in your dashboard. The signature is included in the X-VoiceInfra-Signature header as a hex-encoded string. To verify a webhook:
  1. Read the raw request body as bytes (before any JSON parsing).
  2. Compute HMAC-SHA256(raw_body, your_webhook_secret) and hex-encode the result.
  3. Compare your computed digest to the value in X-VoiceInfra-Signature using a constant-time comparison to prevent timing attacks.
  4. Reject the request with 401 if the signatures do not match.
Always verify the signature before processing a webhook payload. Without verification, your endpoint could process forged or tampered requests from a third party.
Python
Node.js
Use express.raw() (not express.json()) as your body parser middleware so that the raw bytes are available for signature verification before the body is parsed as JSON.

Responding to webhooks

Your endpoint must return HTTP 200 to acknowledge receipt. VoiceInfra considers any other status code — including 2xx codes other than 200 — as a failed delivery and will retry. Do heavy processing asynchronously. Push the payload onto a queue (for example, SQS, BullMQ, or Celery) and return 200 immediately. This keeps your response time well within the timeout window and prevents retries caused by slow downstream operations.

Delivery logs

View the full history of webhook deliveries in your VoiceInfra dashboard at Settings → Webhooks → Delivery Logs. For each delivery you can see:
  • Timestamp — when the delivery was attempted
  • Event type — the X-VoiceInfra-Event value sent
  • HTTP status code — the status code your endpoint returned
  • Response time — how long your endpoint took to respond
  • Request and response payloads — the full JSON body sent and the response body returned
Use the delivery logs to diagnose failed deliveries, confirm that signature verification is working correctly, and replay specific events during development.