Overview
Webhooks allow you to receive real-time HTTP notifications when specific events occur in your 60db account. This enables you to build event-driven workflows and integrations.How Webhooks Work
Available Events
Text-to-Speech
tts.completed- TTS generation completed successfullytts.failed- TTS generation failed
Speech-to-Text
stt.completed- STT transcription completedstt.failed- STT transcription failed
Custom Voices
voice.created- Custom voice creation startedvoice.ready- Custom voice is ready to usevoice.failed- Custom voice creation failed
Creating a Webhook
- JavaScript
- Python
Webhook Payload
When an event occurs, we send a POST request with this structure:Handling Webhooks
Express.js Example
Flask Example
Security
Signature Verification
Always verify webhook signatures to ensure requests are from 60db:HTTPS Required
Webhook URLs must use HTTPS for security.IP Whitelisting
Optionally whitelist 60db IP addresses:52.89.214.23834.212.75.3054.218.53.128
Best Practices
Respond Quickly
Respond Quickly
- Return 200 OK immediately
- Process events asynchronously
- Don’t wait for long operations
Handle Retries
Handle Retries
- We retry failed webhooks up to 3 times
- Implement idempotency to handle duplicates
- Use event IDs to track processed events
Error Handling
Error Handling
- Log all webhook events
- Monitor webhook failures
- Set up alerts for repeated failures
Testing
Testing
- Test with ngrok or similar tools during development
- Verify signature validation works
- Test all event types you subscribe to
Monitoring
Track webhook health in your dashboard:- Delivery Rate: Percentage of successful deliveries
- Response Time: Average response time
- Error Rate: Failed webhook deliveries
- Recent Events: Last 100 webhook events