Webhook management requests, responses, and event payload samples for common Whats91 webhook flows.
Webhook Samples
Summary
Webhook management requests, responses, and event payload samples for common Whats91 webhook flows.
Prerequisites
- A Whats91 account
- A generated public API token
Related documentation
Use these samples when wiring the management API and building receivers for Whats91 event deliveries.
List Webhooks
Endpoint: GET /api/v2/webhooks. Optional query parameters are senderId, status, event, page, and limit.
curl -X GET "https://graph.whats91.com/api/v2/webhooks?senderId=916268662275&status=ACTIVE&event=message.inbound.text" \
-H "Authorization: Bearer w91_public_token_here"{
"success": true,
"message": "Webhooks retrieved",
"data": [
{
"webhookUid": "wh_abc",
"name": "CRM delivery hook",
"endpointUrl": "https://crm.example.com/webhooks/whats91",
"events": ["message.inbound.text", "message.status.delivered"],
"status": "ACTIVE",
"retryEnabled": true,
"retryMaxAttempts": 3,
"hasVerificationToken": true
}
],
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}Get One Webhook
Endpoint: GET /api/v2/webhooks/:webhookUid. Use the existing uid returned as webhookUid.
curl -X GET "https://graph.whats91.com/api/v2/webhooks/wh_abc?senderId=916268662275" \
-H "Authorization: Bearer w91_public_token_here"Update Webhook
Endpoint: POST /api/v2/webhooks/:webhookUid. Updates use POST so integrations only need GET and POST.
curl -X POST "https://graph.whats91.com/api/v2/webhooks/wh_abc" \
-H "Authorization: Bearer w91_public_token_here" \
-H "Content-Type: application/json" \
-d '{
"senderId": "916268662275",
"webhook": {
"status": "INACTIVE",
"retryEnabled": false
}
}'{
"webhook": {
"verificationToken": "new-shared-secret"
}
}{
"webhook": {
"clearVerificationToken": true
}
}Updating a webhook does not rotate the signing secret. Create a new webhook if you need a fresh signing secret.
Event Payload Samples
| Event key | Use it for | Typical consumer |
|---|---|---|
| message.inbound.text | Incoming text messages from customers. | CRM, support inbox, chatbot. |
| message.status.delivered | Delivery confirmation for sent messages. | Order timeline, campaign reports. |
| message.status.failed | Delivery failure tracking. | Alerting and retry workflows. |
| template.status_update | Template review status changes. | Template operations dashboard. |
{
"event": "message.inbound.text",
"webhookUid": "wh_abc",
"senderId": "916268662275",
"data": {
"from": "919888888888",
"messageId": "wamid.HBgMOTE5...",
"text": "I need help with my order",
"timestamp": "2026-06-05T10:30:00.000Z"
}
}{
"event": "message.status.delivered",
"webhookUid": "wh_abc",
"senderId": "916268662275",
"data": {
"messageId": "wamid.HBgMOTE5...",
"recipient": "919888888888",
"status": "delivered",
"timestamp": "2026-06-05T10:31:00.000Z"
}
}{
"event": "message.status.failed",
"webhookUid": "wh_abc",
"senderId": "916268662275",
"data": {
"messageId": "wamid.HBgMOTE5...",
"recipient": "919888888888",
"status": "failed",
"error": {
"code": "131026",
"message": "Message undeliverable"
}
}
}{
"event": "template.status_update",
"webhookUid": "wh_abc",
"senderId": "916268662275",
"data": {
"templateName": "payment_reminder_v1",
"category": "UTILITY",
"language": "en",
"status": "APPROVED"
}
}Error Samples
{
"success": false,
"message": "Missing authorization token",
"error_code": "MISSING_AUTH_TOKEN",
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}{
"success": false,
"message": "Unsupported webhook event: message.invalid",
"error_code": "VALIDATION_FAILED",
"details": {},
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}Related Documentation
Webhook
Create and manage Whats91 Webhooks v2 event destinations with the canonical public API route.
Examples
Practical webhook receiver examples and use cases for CRM, delivery tracking, and template operations.
Chat Text
Send Whats91-specific free-form chat text messages inside the customer service window.
Message Status
Retrieve the latest status and lifecycle events for one message.