Overview
Vaani provides two types of webhooks for campaign monitoring:- Campaign-Level Webhooks — Triggered on campaign status changes
- Per-Call Webhooks — Triggered after each call completes post-processing
Campaign-Level Webhooks
Notifies you when campaign status changes (active, paused, completed, cancelled).
Configuration
Providecampaign_webhook_url when creating or updating a campaign:
Payload
Per-Call Webhooks
Notifies you after each call completes and transcript/summary are generated.Configuration
Provideper_call_webhook_url when creating or updating a campaign:
Payload
Webhook Retry Logic
If your webhook endpoint is unreachable or returns a non-2xx status, Vaani automatically retries with exponential backoff:
After 5 failed attempts, the webhook is marked as failed and no further retries occur.
Webhook Security
Verify Webhook Signature
Vaani signs all webhook payloads with HMAC-SHA256. Verify the signature before processing: Request Headers:Webhook Endpoint Requirements
Your webhook endpoint must:- Respond quickly (< 5 seconds) to avoid timeouts
- Return 2xx status to acknowledge receipt
- Be publicly accessible over HTTPS
- Handle duplicate events (use event IDs for idempotency)
Example Flask Endpoint
Event Types Reference
Campaign Events
Call Events
Testing Webhooks
Use tools like webhook.site or ngrok to test webhooks locally:Common Issues
Webhook not receiving events
Webhook not receiving events
- Ensure URL is publicly accessible over HTTPS
- Check firewall/security group rules
- Verify endpoint returns 2xx status
- Check Vaani logs for delivery attempts
Receiving duplicate events
Receiving duplicate events
- Implement idempotency using event IDs
- Store processed event IDs in database
- Return 200 for duplicate events
Webhook timing out
Webhook timing out
- Process events asynchronously (queue-based)
- Respond with 200 immediately, then process
- Keep endpoint response time < 5 seconds

