Inbound messages
When a confirmed client sends ordinary text in a private conversation with a company bot, MassAccess sends a message.inbound event to the company Webhook URL.
Event data example
{
"event": "message.inbound",
"event_version": 1,
"event_id": "728b70f4-6cf3-5d85-9f39-0a2df2dbe01d",
"timestamp": "2026-09-21T08:16:31Z",
"data": {
"service": "max",
"bot_name": "support_max_bot",
"phone_number": "12345678901",
"text": "I need help with my order"
}
}Event fields
| Name | Type | Required | Description |
|---|---|---|---|
| event | "message.inbound" | Yes | Constant message.inbound event name. |
| event_version | integer | Yes | Event format version; always 1 for this schema. |
| event_id | UUID | Yes | Unique event UUID. It equals the Idempotency-Key header on every delivery attempt. |
| timestamp | string (date-time) | Yes | Event creation time in UTC, formatted as RFC 3339/ISO 8601. |
| data | object | Yes | Inbound message data. |
| data.service | "telegram" | "max" | Yes | Message channel: telegram or max. |
| data.bot_name | string | Yes | Name of the company bot that received the message. |
| data.phone_number | string | Yes | Confirmed client phone number. |
| data.text | string | Yes | Original text without truncation or HTML/Markdown conversion. |
All listed fields are required and cannot be null. Additional fields are not allowed.
timestamp is the MassAccess event creation time, not the Telegram or MAX message time.
The maximum text length is 4096 characters; a company can set a lower value.
Company configuration
Inbound messages are disabled by default.
- Enable the Accept text messages switch.
- If needed, set the maximum length of one message and the number of messages accepted from one client during the selected period. The settings show the allowed values.
If the text is longer than the configured maximum, no notification is created for it. If a client exceeds the allowed number of messages during the selected period, notifications for messages over the limit are not created and are not sent later. New messages are accepted again when their number in the current period falls below the limit.