> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chatbridge.mx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chatbridge.mx/_mcp/server.

# Inbound message

POST 

Notification of an inbound message sent by a user to your WhatsApp Business number (`type: message`).

The `message` object includes the content type (`text`, `image`, `video`, `document`, `audio`, `button`, `location`, `contacts`) and its data, along with the sender (`from`, `from_user_id`). The `context` field is only included when the message is a reply to a message you previously sent, and indicates the original `message_id` it replies to.

For `contacts` messages (a user shares one or more contacts as vCards), `message.contacts` carries the shared contacts. Every field is optional — Meta omits the ones the user did not have in their address book — and any extra field Meta sends (e.g. `vcard`, `origin`) is propagated as-is: do not assume a closed shape.

Reference: https://docs.chatbridge.mx/whats-app/webhooks/message-inbound-webhook

## Request

### Payload

- `phone_number_id` (string, optional)
- `message_id` (string, optional)
- `type` ("message", optional)
- `status` (enum, optional) — `reply` when the message replies to a message you previously sent (`message.context` carries the original id); `no_active_session` when it arrived outside an active session.
  - Allowed values: `reply`, `no_active_session`
- `message` (InboundWebhookEventMessage, optional)

## Types

### InboundWebhookEventMessage

- `from` (string, optional)
- `from_user_id` (string, optional) — BSUID of the contact (e.g. `MX.1264908862298277`). Use it as `to` to reply when `from` is not available (Click to WhatsApp flows).
- `timestamp` (string, optional)
- `type` (enum, optional)
  - Allowed values: `text`, `image`, `video`, `document`, `audio`, `button`, `interactive`, `location`, `contacts`
- `text` (TextContent, optional)
- `image` (InboundMedia, optional)
- `video` (InboundMedia, optional)
- `document` (InboundMedia, optional)
- `audio` (InboundMedia, optional)
- `button` (InboundWebhookEventMessageButton, optional)
- `interactive` (map from string to any, optional) — Reply to an interactive message (button/list), with Meta's original structure.
- `location` (InboundWebhookEventMessageLocation, optional)
- `contacts` (list of InboundContact, optional) — One or more contacts shared by the user (vCard). Present only when `type` is `contacts`.
- `context` (InboundWebhookEventMessageContext, optional) — Present only when the message is a reply.

### TextContent

- `body` (string, required) — Text message content.

### InboundMedia

- `url` (string, optional) — Public URL of the resource.
- `caption` (string, optional)

### InboundWebhookEventMessageButton

- `text` (string, optional)
- `payload` (string, optional)

### InboundWebhookEventMessageLocation

- `latitude` (double, optional)
- `longitude` (double, optional)
- `name` (string, optional)
- `address` (string, optional)
- `url` (string, optional)

### InboundContact

A contact shared by the user. Every field is optional — Meta omits the ones the user did not have in their address book. Besides the fields listed here, real traffic may carry extra fields outside Meta's documented schema (e.g. `vcard` with the full vCard in Base64, or `origin`); they are propagated as-is — do not assume a closed shape.

- `name` (InboundContactName, optional)
- `org` (InboundContactOrg, optional)
- `phones` (list of InboundContactPhonesItems, optional)
- `emails` (list of InboundContactEmailsItems, optional)
- `urls` (list of InboundContactUrlsItems, optional)
- `addresses` (list of InboundContactAddressesItems, optional)
- `birthday` (string, optional) — Birth date, `YYYY-MM-DD` format.

### InboundWebhookEventMessageContext

Present only when the message is a reply.

- `message_id` (string, optional)

### InboundContactName

- `formatted_name` (string, optional) — Full formatted name, as displayed in WhatsApp.
- `first_name` (string, optional)
- `last_name` (string, optional)
- `middle_name` (string, optional)
- `prefix` (string, optional) — Name prefix (e.g. "Sr.", "Dra.").
- `suffix` (string, optional) — Name suffix (e.g. "Jr.", "III").

### InboundContactOrg

- `company` (string, optional)
- `department` (string, optional)
- `title` (string, optional) — Contact's job title.

### InboundContactPhonesItems

- `phone` (string, optional) — Phone number in human-readable format.
- `wa_id` (string, optional) — WhatsApp identifier of the phone number.
- `type` (string, optional) — Phone type (`CELL`, `WORK`, `HOME`, etc.).

### InboundContactEmailsItems

- `email` (string, optional)
- `type` (string, optional) — Email type (`WORK`, `HOME`, etc.).

### InboundContactUrlsItems

- `url` (string, optional)
- `type` (string, optional) — URL type (`WORK`, `HOME`, etc.).

### InboundContactAddressesItems

- `street` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `zip` (string, optional)
- `country` (string, optional)
- `country_code` (string, optional) — ISO country code.
- `type` (string, optional) — Address type (`WORK`, `HOME`, etc.).