Skip to main content
When a VoiceInfra call completes, your configured webhook endpoint receives a POST request containing the full call record — transcript, recording URL, AI summary, outcome, duration, and metadata. Use this data to update your CRM, feed your analytics pipeline, trigger post-call workflows, or archive records in your own system. Every payload is signed with HMAC-SHA256 so you can verify authenticity before processing.

What You Receive

Every webhook delivery contains the following fields:
FieldTypeDescription
call_idstringUnique identifier for the call
from_numberstringCaller’s phone number in E.164 format
to_numberstringThe number that was called
agent_idstringID of the AI agent that handled the call
duration_secondsintegerTotal call duration in seconds
start_timeISO 8601Timestamp when the call started
end_timeISO 8601Timestamp when the call ended
recording_urlstringURL to the call recording audio file
transcriptstringFull conversation transcript with speaker labels
call_outcomestringanswered, voicemail, or failed
summarystringAI-generated summary of the call

Configuring a Webhook

1

Go to Settings → Webhooks → Add Webhook

Open your VoiceInfra dashboard, navigate to Settings → Webhooks, and click Add Webhook.
2

Enter your endpoint URL

Paste the URL of your server endpoint. The endpoint must be publicly accessible over HTTPS and respond with an HTTP 200 status code within the timeout window.
3

Set a webhook secret (recommended)

Enter a secret string of your choice. VoiceInfra uses this secret to sign every payload with HMAC-SHA256 and sends the signature in the X-VoiceInfra-Signature header. Verify this signature in your handler to confirm the request is authentic.
4

Test the webhook

Click Test to send a sample payload to your endpoint immediately. Check your server logs to confirm it received the request and returned 200. Fix any connectivity issues before enabling.
5

Enable and save

Toggle the webhook to Enabled and click Save. Your endpoint starts receiving POST requests as soon as the next call completes.
Your endpoint must be publicly accessible and return a 200 status code within the timeout window. Endpoints that time out or return non-2xx responses are treated as failed deliveries and trigger automatic retries.

Verifying Webhook Signatures

Always verify the X-VoiceInfra-Signature header before processing a payload. This ensures the request came from VoiceInfra and was not tampered with in transit.
import hmac
import hashlib

def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode('utf-8'),
        payload,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature)

# In your webhook handler:
# signature = request.headers.get('X-VoiceInfra-Signature')
# is_valid = verify_webhook(request.body, signature, YOUR_SECRET)
Use hmac.compare_digest instead of == to prevent timing attacks when comparing signature strings.

Example Webhook Payload

{
  "call_id": "call_01HXYZ123456",
  "from_number": "+14155550100",
  "to_number": "+18005551234",
  "agent_id": "agent_abc123",
  "duration_seconds": 147,
  "start_time": "2025-01-15T14:23:00Z",
  "end_time": "2025-01-15T14:25:27Z",
  "recording_url": "https://recordings.voiceinfra.ai/call_01HXYZ123456.mp3",
  "call_outcome": "answered",
  "summary": "Customer called to inquire about January 15 appointment. Confirmed appointment at 2pm. No changes requested."
}

Delivery Logs

Every webhook delivery is recorded in your dashboard. Access the logs at Settings → Webhooks → View Logs to see:
  • Timestamp — exact time the delivery was attempted
  • HTTP status code — the response code returned by your endpoint
  • Response time — how long your endpoint took to respond
  • Full payload — the complete JSON body that was sent
  • Response body — your endpoint’s response (useful for debugging)
Failed deliveries are retried automatically with exponential back-off. Check the logs to confirm delivery after fixing an endpoint issue — you don’t need to retrigger the call.

Multiple Endpoints

Configure as many webhook endpoints as you need — one per system is a common pattern:
  • CRM endpoint — receives call data and logs Activities in Salesforce or HubSpot
  • Analytics endpoint — feeds call metadata into your data warehouse or BI tool
  • Notification endpoint — posts a summary to Slack or Teams when calls complete
Each endpoint receives the same payload independently. Manage all endpoints from Settings → Webhooks.

Frequently Asked Questions

The webhook fires when the call completes — that is, when both parties have hung up. Post-call processing (transcript generation, AI summary) happens in the seconds immediately after hang-up, and the webhook is sent once that processing is complete.
No, but it is strongly recommended. Without a secret, you cannot verify that a request came from VoiceInfra. Any party that discovers your endpoint URL could send fake payloads. Set a secret and always validate the signature before acting on a payload.
Yes. Add as many endpoints as you need in Settings → Webhooks. Each endpoint receives every call payload independently.
VoiceInfra retries failed deliveries automatically. Check the delivery logs in your dashboard to see retry status. Once your endpoint recovers and returns 200, the delivery is marked successful.
Yes. The transcript field contains the full conversation with speaker labels — both the caller’s words and the AI agent’s responses are included.
Yes. Toggle the webhook to Disabled in the dashboard. Your configuration is saved and no payloads are sent while disabled. Re-enable it at any time to resume delivery.