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

json
{
  "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

NameTypeRequiredDescription
event"message.inbound"YesConstant message.inbound event name.
event_versionintegerYesEvent format version; always 1 for this schema.
event_idUUIDYesUnique event UUID. It equals the Idempotency-Key header on every delivery attempt.
timestampstring (date-time)YesEvent creation time in UTC, formatted as RFC 3339/ISO 8601.
dataobjectYesInbound message data.
data.service"telegram" | "max"YesMessage channel: telegram or max.
data.bot_namestringYesName of the company bot that received the message.
data.phone_numberstringYesConfirmed client phone number.
data.textstringYesOriginal 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.

  1. Enable the Accept text messages switch.
  2. 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.