What are Webhooks?
Webhooks are HTTP callbacks that Dialgen sends to your server when specific events occur. Instead of polling for updates, your application receives instant notifications.Available Webhooks
onBatchComplete
Triggered when all calls in the batch are finished.onCallComplete
Triggered after each individual call completes. Includes full call data:onBatchFailed
Triggered if the batch fails to process:Configuring Webhooks
Add webhook URLs when creating your batch:Implementing Webhook Endpoints
Node.js Example
Python Example
Best Practices
Respond Quickly
- Respond within 5 seconds to avoid retries
- Return a 2xx status code immediately
- Process data asynchronously if needed
Handle Idempotency
Webhooks may be delivered multiple times. Use idempotency keys:Secure Your Endpoints
Verify webhook authenticity:Log Everything
Keep detailed logs for debugging:Handle Errors Gracefully
Retry Logic
If your endpoint fails, Dialgen will retry:- Retry Attempts: Up to 3 times
- Retry Delay: Exponential backoff (1s, 5s, 25s)
- Timeout: 30 seconds per attempt
Testing Webhooks
Use ngrok for Local Testing
Test with curl
Common Use Cases
Update CRM
Send Notifications
Trigger Workflows
Next Steps
Monitoring
Track batch progress and performance
Call Metrics API
Retrieve detailed call metrics