Overview
Instead of polling the API for changes, webhooks push events to your application in real-time. This is more efficient and provides better user experience.Creating a Webhook
Create a webhook through the API:Supported Events
Conversation Events
conversation.created- New conversation createdconversation.updated- Conversation updatedconversation.assigned- Conversation assigned to agentconversation.closed- Conversation closed
Customer Events
customer.created- New customer createdcustomer.updated- Customer updated
Message Events
message.sent- Message sentmessage.received- Message received
User Events
user.created- New user createduser.updated- User updated
Call Events
call.initiated- Call has been initiatedcall.ringing- Call is ringingcall.answered- Call has been answeredcall.completed- Call has completedcall.failed- Call failedcall.recording.available- Call recording is available
Webhook Payload
When an event occurs, we’ll send a POST request to your webhook URL:Signature Verification
Each webhook request includes anX-Webhook-Signature header for verification. Always verify signatures to ensure requests are from G-Tateth.
JavaScript/Node.js
Python
Retry Policy
Webhooks are automatically retried on failure:- Max Retries: Configurable (default: 3)
- Backoff Strategy:
linearorexponential(default: exponential) - Exponential: 2s, 4s, 8s, 16s…
- Linear: 5s, 10s, 15s…
Configuring Retry Policy
Testing Webhooks
Test your webhook endpoint:Delivery Logs
View webhook delivery history:Best Practices
1. Always Verify Signatures
Never trust requests without signature verification:2. Respond Quickly
Return 200 within 5 seconds. Process events asynchronously:3. Handle Duplicates
Events may be delivered multiple times. Make handlers idempotent:4. Use HTTPS
Webhooks must use HTTPS URLs. HTTP is not supported for security reasons.5. Idempotency
Make your webhook handlers idempotent - processing the same event multiple times should have the same effect:Troubleshooting
Webhook Not Receiving Events
- Check webhook is active
- Verify URL is accessible (HTTPS required)
- Check delivery logs for errors
- Verify signature verification is working
Webhook Failing
- Check response time (must be < 5 seconds)
- Verify endpoint returns 200 status
- Check server logs for errors
- Review retry policy settings