Developers
Webhooks
Configure webhooks to receive real-time notifications when events occur in your Qwetty organization.
How webhooks work
When an event happens (e.g., a new message arrives), Qwetty sends an HTTP POST request to your configured webhook URL with the event data.
Setting up a webhook
- Go to Settings → Channel and find the Webhook Settings section
- Click Create Webhook
- Configure:
- Name — A descriptive name
- URL — Your HTTPS endpoint
- Events — Which events to receive (messages, status updates, contacts, media)
- Secret — A shared secret for HMAC signature verification
- Save and activate
Event types
| Event | Description |
|---|---|
| message | New message received |
| status | Message delivery/read status update |
| contact | Contact created or updated |
| media | Media attachment received |
Webhook payload
Each webhook delivery includes:
- Event type
- Event data (message content, contact info, etc.)
- Timestamp
- Organization ID
Verifying signatures
Qwetty signs each payload with HMAC-SHA256 using your webhook secret. Always verify the signature:
Code
Testing locally
Use a tool like ngrok to expose your local server:
Code
Then use the ngrok URL as your webhook endpoint during development.
Best practices
- Always verify signatures to ensure requests come from Qwetty
- Respond quickly — Return a 2xx status within 5 seconds
- Handle retries — Qwetty may retry failed deliveries
- Use HTTPS — Webhook URLs must use HTTPS in production
Next steps
- Channel Webhooks — Platform-specific webhook setup
- API Reference — Full endpoint documentation
Last modified on