Webhook Format
Format of incoming webhooks about message status. Notifications are sent to the URL in company settings.
Request Headers
| Header | Description |
|---|---|
| X-Signature | HMAC-SHA256 signature of the request body |
| Idempotency-Key | Deduplication key equal to event_id and preserved across retries and replay. |
| X-Webhook-Attempt | Delivery attempt number, starting at 1. |
| Content-Type | application/json |
| User-Agent | MassAccess-Webhook/2.0 |
Webhook Fields
| Name | Type | Required | Description |
|---|---|---|---|
| event | string | Yes | Event type: message.status | client.phone.changed | client.registered | message.inbound |
| event_version | integer | Yes | Integer event contract version (currently 1) |
| event_id | string | Yes | Unique message identifier (UUID) |
| timestamp | string (ISO 8601) | Yes | Event time in ISO 8601 UTC |
| data.state | string | No | Message status: new, processing, sent, failed |
| data.error_code | string | No | Error code (present only on failure) |
| data.error_description | string | No | Human-readable error description (present only on failure) |
| data.client_id | integer | No | Client identifier (for client.* events) |
| data.phone | string | No | Client phone number (for client.* events) |
| data.bot_name | string | No | Bot name for client events and message.inbound. |
| data.exists | boolean | No | Whether the client has an active registration in the company (client.check event) |
| data.bots | array | No | Active registrations with name and service fields (client.check event). |
| data.service | telegram | max | No | Inbound service for message.inbound: telegram or max. |
| data.phone_number | string | No | Confirmed client phone number for message.inbound. |
| data.text | string | No | Original UTF-8 text, at most 4096 Unicode scalar values, without HTML/Markdown conversion. |