Webhook Configuration
Webhooks allow DEP to send events in real time to your own HTTP endpoint — for example, when an incoming message is received, or when an outgoing message’s status changes to delivered, read, or failed. This feature is intended for developers who want to integrate the platform with internal systems (CRM, ticketing, automation) without having to poll.
You access this feature from Menu > Developer > Webhook (/developer/webhooks). This page requires the developer:manage_webhooks permission; without that permission, the Add Endpoint button and the delete button are disabled.

Webhook List
Section titled “Webhook List”The main page displays all registered webhooks as expandable rows. Each row shows:
| Column | Description |
|---|---|
| Endpoint URL | The HTTP address where events are delivered (displayed with a globe icon) |
| Authentication / secret badge | Shows “OAuth 2.0” or “Bearer” when authentication is not HMAC. For HMAC webhooks without a signing secret (has_secret = false), displays a warning badge indicating no signing secret is configured |
| Event badge | One badge per subscribed event (e.g. message.inbound) |
| Scope badge | Shows restricted assets (WABA: ..., Phone: ..., Channel: ...) or All assets if unrestricted |
| Status badge | Healthy (green) or Failed (red) — see the note below |
Each row includes actions: Send test event, Generate secret (to generate or rotate an HMAC whsec_... secret), Deliveries (opens the 7-day failed delivery log), and a delete button.
Status Badge Meanings
Section titled “Status Badge Meanings”| Badge | Meaning |
|---|---|
| Healthy | The webhook is active (is_active = true) |
| Failed | The webhook is inactive (is_active = false) |
This badge reflects the webhook’s active/inactive state, not the outcome of the last delivery. To inspect actual delivery failures, open the Deliveries panel.
Adding a New Webhook
Section titled “Adding a New Webhook”Click Add Endpoint to open the creation dialog. Available fields:
| Field | Required | Default | Description |
|---|---|---|---|
| Endpoint URL | Yes | — | The HTTP destination address. Must be a valid URL (e.g. https://api.myapp.com/webhook) |
| Verification Token | No | — | Used for HMAC authentication (hub.verify_token handshake and payload signing). When omitted at creation, the platform automatically generates a secret (whsec_...) and shows it once |
| Events to deliver | Yes | — | At least one event must be selected (see the events table) |
| Authentication | No | HMAC | Authentication method used when the platform dispatches webhooks to your endpoint |
| Scope | No | All assets | Restrict the webhook to specific WABAs, phone numbers, or channel types |
Available Events
Section titled “Available Events”Standard events are always available:
| Event | Label |
|---|---|
message.inbound | Inbound Message Received |
message.status.sent | Message Sent |
message.status.delivered | Message Delivered |
message.status.read | Message Read |
message.status.failed | Message Failed |
pwa_redirect_clicked | PWA Chat Link Clicked / Redeemed |
pwa_session_started | PWA Chat Session Started |
pwa_message_sent | PWA Visitor Message Sent |
pwa_message_received | PWA Reply Delivered to Visitor |
pwa_push_delivered | PWA Web Push Notification Delivered |
pwa_session_closed | PWA Chat Session Closed |
Webchat PWA Event Payloads (pwa_*)
Section titled “Webchat PWA Event Payloads (pwa_*)”All six pwa_* events are sent in the standard ConversationWebhookPayload envelope (event, timestamp, client_account_id, conversation_id, contact, channel: { type: "webchat", id: "<widget_id>" }, and data):
{ "event": "pwa_redirect_clicked", "timestamp": "2026-10-31T12:00:00Z", "client_account_id": "00000000-0000-0000-0000-000000000000", "conversation_id": "11111111-1111-1111-1111-111111111111", "contact": { "id": "22222222-2222-2222-2222-222222222222", "phone_number": "+6281200000000", "name": "Budi Santoso" }, "channel": { "type": "webchat", "id": "33333333-3333-3333-3333-333333333333" }, "data": { "link_id": "44444444-4444-4444-4444-444444444444", "visitor_id": "55555555-5555-5555-5555-555555555555", "widget_id": "33333333-3333-3333-3333-333333333333", "source_conversation_id": "66666666-6666-6666-6666-666666666666" }}Details of the data object for each pwa_* event:
| Event | data Object Fields |
|---|---|
pwa_redirect_clicked | { "link_id": "<uuid>", "visitor_id": "<uuid>", "widget_id": "<uuid>", "source_conversation_id": "<uuid|null>" } |
pwa_session_started | { "visitor_id": "<uuid>", "widget_id": "<uuid>", "link_id": "<uuid|null>", "resumed": true | false } |
pwa_message_sent | { "visitor_id": "<uuid>", "widget_id": "<uuid>", "message_id": "<string>", "message_type": "<string>", "text_preview": "<string>" } |
pwa_message_received | { "visitor_id": "<uuid>", "widget_id": "<uuid>", "message_id": "<string>", "sender": "agent" | "bot", "text_preview": "<string>" } |
pwa_push_delivered | { "visitor_id": "<uuid>", "widget_id": "<uuid>", "subscription_id": "<uuid>", "message_id": "<string|null>" } |
pwa_session_closed | { "visitor_id": "<uuid>", "widget_id": "<uuid>" } |
Advanced events appear when advanced_webhooks is enabled on your account:
| Event | Label |
|---|---|
template_status_update | Template Status Update |
template_category_update | Template Category Update |
template_quality_update | Template Quality Update |
phone_number_quality_update | Phone Number Quality Update |
Authentication Method
Section titled “Authentication Method”Choose how DEP authenticates when delivering webhooks to your endpoint:
| Method | Additional fields | How it works |
|---|---|---|
HMAC Signature (Default) (hmac) | Verification Token (optional) | The platform signs the exact raw payload bytes with the secret (whsec_...) in the X-Mahadata-Signature-256 header (or the account’s configured signature header). The secret is shown once when created or regenerated |
OAuth 2.0 Client Credentials (oauth2_client_credentials) | Token URL, Client ID, Client Secret, Scopes | The platform fetches an access token from your server and includes it with every delivery |
Static Bearer Token (bearer_static) | Bearer Token | The static token is sent in the Authorization: Bearer <token> header on every delivery |
OAuth 2.0 fields:
| Field | Description |
|---|---|
| Token URL | Your authorization server endpoint (e.g. https://your-auth-server/oauth/token) |
| Client ID | OAuth client ID |
| Client Secret | OAuth client secret (masked) |
| Scopes | Space-separated list of scopes (optional, e.g. webhook.write) |
By default, a webhook receives every event across all assets in the account. You can narrow the scope to any combination of the following:
| Scope type | Selection source |
|---|---|
| WABA | Tenant WABA list (GET /api/wabas) |
| Phone number | Tenant non-placeholder phone numbers (GET /api/phone-numbers) |
| Channel type | whatsapp, rbm, telegram, line, email, webchat, instagram, facebook |
Scopes use OR semantics: an event is delivered if it matches any of the selected scopes. When no scope is selected, the webhook applies to the entire account.
Saving & Regenerating the Secret (HMAC)
Section titled “Saving & Regenerating the Secret (HMAC)”- At creation: When no secret is provided when creating an HMAC webhook, the platform generates one (
whsec_...) automatically. The confirmation dialog shows the signing secret with a copy button only once — save it immediately. - Generate secret in the portal: If an HMAC webhook has no signing secret (indicated by the no signing secret badge) or you want to rotate its secret, click Generate secret on the webhook row in Developer > Webhooks. A new
whsec_...secret is generated and shown once, and all subsequent deliveries use the new secret.
Delivery Log (Deliveries)
Section titled “Delivery Log (Deliveries)”Click Deliveries on a webhook to open the delivery log panel. This panel shows failed deliveries from the last 7 days. When there are no failures, the panel confirms that recent deliveries succeeded.
Each delivery entry displays:
| Column | Description |
|---|---|
| Event type | Type of event dispatched |
| Response status | Final HTTP status code from your endpoint (including the final 5xx code after retries finish) |
| Latency | Response time in milliseconds (if available) |
| Attempts | Number of delivery attempts (up to 4 attempts: immediately, then after 5, 15, and 30 seconds for 5xx, timeouts, connection errors, 408, and 429) |
| Time | Relative time since the delivery attempt (e.g. “5m ago”) |
Expanding an entry shows Failure Reason, Response Body, Request Payload (JSON), Matched scope (displays a TEST badge if the delivery came from a test event), and the Replay button.
Replay Behavior
Section titled “Replay Behavior”- Replay re-sends the exact same payload bytes with a fresh signature, the same signature header name configured for the account, and the same authentication headers (
Authorizationand custom headers) as the original delivery. - Replay is not available for OAuth 2.0 webhooks (
oauth2_client_credentials) yet.
Sending a Test Event
Section titled “Sending a Test Event”The Send test event button on each webhook triggers a sample event delivery to your endpoint. This button is disabled if the tenant has no active non-placeholder phone number.
Deleting a Webhook
Section titled “Deleting a Webhook”Click the delete icon on the webhook row. A confirmation dialog appears before the webhook is permanently removed. This action requires the developer:manage_webhooks permission.