What Are Webhooks?
Webhooks are HTTP callbacks that TopCalls sends to your server when events occur. They’re the best way to integrate TopCalls with your existing systems.Real-Time Updates
Get notified instantly when calls complete, fail, or campaigns update. No polling required.
Complete Data
Receive full call details, transcripts, recordings, and analysis in a single webhook payload.
Reliable Delivery
Built-in retry logic ensures webhooks are delivered even if your server is temporarily unavailable.
Secure
Optional signature verification ensures webhooks are authentic and haven’t been tampered with.
Setting Up Webhooks
Per-Call Webhooks
Configure webhooks when creating a call:Campaign Webhooks
Configure webhooks when creating a campaign:Webhook Payload
Here’s a completecall.completed webhook payload:
Webhook Timing
Successful Calls
Webhooks are sent ~15 seconds after call ends to ensure:- Recording URL is available
- Transcript is complete
- Call summary is generated (if configured)
Failed Calls
Webhooks are sent immediately when the call fails (no recording to wait for).Handling Webhooks
Express.js Example
Signature Verification
Webhook Retries
TopCalls automatically retries failed webhook deliveries:- Initial: Immediate
- Retry 1: After 1 minute
- Retry 2: After 5 minutes
- Retry 3: After 15 minutes
- Retry 4: After 1 hour
Best Practices
✅ Do This
- Return 200 quickly: Acknowledge receipt within 1 second
- Process asynchronously: Don’t block the webhook response
- Idempotency: Handle duplicate webhooks gracefully
- Log everything: Keep logs for debugging
- Verify signatures: Use signature verification in production
- Handle errors: Don’t let webhook processing crash your server
❌ Don’t Do This
- Long processing: Don’t process synchronously in the webhook handler
- Ignore duplicates: Webhooks may be delivered multiple times
- Skip verification: Always verify signatures in production
- Block on external APIs: Don’t wait for slow external services

