Delivery
VoiceInfra delivers webhook events by sending an HTTPPOST 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 theX-VoiceInfra-Signature header as a hex-encoded string.
To verify a webhook:
- Read the raw request body as bytes (before any JSON parsing).
- Compute
HMAC-SHA256(raw_body, your_webhook_secret)and hex-encode the result. - Compare your computed digest to the value in
X-VoiceInfra-Signatureusing a constant-time comparison to prevent timing attacks. - Reject the request with
401if the signatures do not match.
Python
Node.js
Responding to webhooks
Your endpoint must returnHTTP 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-Eventvalue 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