Webhooks & Events
Receive real-time notifications about message delivery status, template approvals, and platform events via HTTP callbacks.
What are Webhooks?
Webhooks are HTTP callbacks that Sent sends to your application when events occur. Instead of polling the API for updates, webhooks push events to your endpoint in real-time.
Webhook vs Polling
| Approach | Latency | Efficiency | Complexity |
|---|---|---|---|
| Webhooks | Seconds | High (push) | Medium |
| Polling | Minutes | Low (pull) | Low |
Choose Your Implementation
🚀 Quick Setup
Basic webhook configuration for message status tracking
✅ Production Ready
Full implementation with security, retries, and scaling
Webhook Event Types
| Event | Description | Use Case |
|---|---|---|
messages | Message status changes (sent, delivered, failed) | Track delivery |
templates | Template approval status changes | Monitor approvals |
Implementation Paths
Path A: Simple Webhook (5 minutes)
For basic message status tracking:
Configure endpoint - Set up your webhook URL
Verify signatures - Ensure webhook authenticity
Handle events - Process message status updates
Path B: Production Webhook (30 minutes)
For mission-critical applications:
Complete Path A
Implement idempotency - Handle duplicate events
Queue-based processing - Scale with queues
Local development - Test webhooks locally
Quick Example
// Express.js webhook handler
app.post('/webhooks/sent', async (req, res) => {
// Acknowledge immediately — prevents retries on slow processing
res.sendStatus(200);
const { field, payload } = req.body;
if (field === 'messages') {
const { message_id, message_status } = payload;
// Update your database
await db.messages.update(message_id, {
status: message_status
});
// Trigger business logic
if (message_status === 'DELIVERED') {
await sendDeliveryNotification(message_id);
}
}
});Webhook Guides
Getting Started
Configure your first webhook endpoint
Event Types
Complete reference for all webhook events
Signature Verification
Verify webhook authenticity with HMAC
Handling Retries
Idempotency and retry strategies
Local Development
Test webhooks on your local machine
Production Checklist
Before going live with webhooks
New to webhooks? Start with Getting Started to set up your first webhook endpoint.