Webhooks
Overview
Section titled “Overview”Webhooks allow your application to receive real-time notifications when events occur in Tellexa.
How Webhooks Work
Section titled “How Webhooks Work”- You register a webhook URL
- Tellexa sends an HTTP POST request when events occur
- Your server processes the event and responds with
200 OK
Setting Up Webhooks
Section titled “Setting Up Webhooks”Creating a Webhook
Section titled “Creating a Webhook”POST https://api.tellexa.ai/v1/webhooksAuthorization: Bearer YOUR_API_KEYContent-Type: application/json
{ "url": "https://yourapp.com/webhooks/tellexa", "events": ["message.created", "task.completed"], "secret": "your_webhook_secret"}Webhook Response
Section titled “Webhook Response”{ "id": "wh_abc123", "url": "https://yourapp.com/webhooks/tellexa", "events": ["message.created", "task.completed"], "active": true, "created_at": "2026-02-06T10:00:00Z"}Event Types
Section titled “Event Types”Message Events
Section titled “Message Events”| Event | Description |
|---|---|
message.created | New message sent or received |
message.updated | Message edited |
message.deleted | Message deleted |
Task Events
Section titled “Task Events”| Event | Description |
|---|---|
task.created | New task created |
task.completed | Task marked complete |
task.updated | Task details changed |
task.reminder | Task reminder triggered |
Calendar Events
Section titled “Calendar Events”| Event | Description |
|---|---|
event.created | Calendar event created |
event.updated | Calendar event modified |
event.reminder | Event reminder triggered |
Integration Events
Section titled “Integration Events”| Event | Description |
|---|---|
integration.connected | New integration added |
integration.disconnected | Integration removed |
integration.error | Integration error occurred |
Webhook Payload
Section titled “Webhook Payload”Example payload for message.created:
{ "id": "evt_xyz789", "type": "message.created", "created_at": "2026-02-06T10:30:00Z", "data": { "message_id": "msg_abc123", "assistant_id": "ast_def456", "content": "Your meeting with John has been scheduled for 3pm tomorrow.", "direction": "outbound" }}Verifying Webhooks
Section titled “Verifying Webhooks”All webhooks are signed using your webhook secret. Verify the signature to ensure the request came from Tellexa.
Signature Header
Section titled “Signature Header”X-Tellexa-Signature: sha256=...Verification (Node.js example)
Section titled “Verification (Node.js example)”const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) { const expected = 'sha256=' + crypto .createHmac('sha256', secret) .update(payload) .digest('hex');
return crypto.timingSafeEqual( Buffer.from(signature), Buffer.from(expected) );}Retry Policy
Section titled “Retry Policy”If your endpoint fails, Tellexa will retry:
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
After 5 failed attempts, the webhook is marked as failing and you’ll receive an email notification.
Best Practices
Section titled “Best Practices”Endpoint Design
Section titled “Endpoint Design”- ✅ Respond with
200 OKquickly (within 5 seconds) - ✅ Process events asynchronously
- ✅ Handle duplicate events (use
idfor deduplication) - ✅ Log all received webhooks
Security
Section titled “Security”- ✅ Always verify signatures
- ✅ Use HTTPS endpoints only
- ✅ Restrict inbound IPs if possible
- ✅ Rotate webhook secrets periodically
Questions? Contact API support →