Webhook Format

Format of incoming webhooks about message status. Notifications are sent to the URL in company settings.

Request Headers

HeaderDescription
X-SignatureHMAC-SHA256 signature of the request body
Idempotency-KeyDeduplication key equal to event_id and preserved across retries and replay.
X-Webhook-AttemptDelivery attempt number, starting at 1.
Content-Typeapplication/json
User-AgentMassAccess-Webhook/2.0

Webhook Fields

NameTypeRequiredDescription
eventstringYesEvent type: message.status | client.phone.changed | client.registered | message.inbound
event_versionintegerYesInteger event contract version (currently 1)
event_idstringYesUnique message identifier (UUID)
timestampstring (ISO 8601)YesEvent time in ISO 8601 UTC
data.statestringNoMessage status: new, processing, sent, failed
data.error_codestringNoError code (present only on failure)
data.error_descriptionstringNoHuman-readable error description (present only on failure)
data.client_idintegerNoClient identifier (for client.* events)
data.phonestringNoClient phone number (for client.* events)
data.bot_namestringNoBot name for client events and message.inbound.
data.existsbooleanNoWhether the client has an active registration in the company (client.check event)
data.botsarrayNoActive registrations with name and service fields (client.check event).
data.servicetelegram | maxNoInbound service for message.inbound: telegram or max.
data.phone_numberstringNoConfirmed client phone number for message.inbound.
data.textstringNoOriginal UTF-8 text, at most 4096 Unicode scalar values, without HTML/Markdown conversion.