Skip to main content

Overview

Vaani provides two types of webhooks for campaign monitoring:
  1. Campaign-Level Webhooks — Triggered on campaign status changes
  2. Per-Call Webhooks — Triggered after each call completes post-processing

Campaign-Level Webhooks

Notifies you when campaign status changes (active, paused, completed, cancelled).

Configuration

Provide campaign_webhook_url when creating or updating a campaign:

Payload


Per-Call Webhooks

Notifies you after each call completes and transcript/summary are generated.

Configuration

Provide per_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:
Python Verification Example:
Always verify webhook signatures in production to prevent spoofing attacks.

Webhook Endpoint Requirements

Your webhook endpoint must:
  1. Respond quickly (< 5 seconds) to avoid timeouts
  2. Return 2xx status to acknowledge receipt
  3. Be publicly accessible over HTTPS
  4. 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

  • Ensure URL is publicly accessible over HTTPS
  • Check firewall/security group rules
  • Verify endpoint returns 2xx status
  • Check Vaani logs for delivery attempts
  • Implement idempotency using event IDs
  • Store processed event IDs in database
  • Return 200 for duplicate events
  • Process events asynchronously (queue-based)
  • Respond with 200 immediately, then process
  • Keep endpoint response time < 5 seconds