> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookmyapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message

> Send a WhatsApp message.

Send a WhatsApp message through a connected HookMyApp channel.

Use `to` for the recipient phone number in international format. The request body is the Meta WhatsApp message payload, signed with the channel token HookMyApp issued for that channel.

Supports all WhatsApp message types:

* `text`: Plain text messages
* `image`, `video`, `audio`, `document`, `sticker`: Media messages
* `location`: Location sharing
* `contacts`: Contact cards
* `interactive`: Buttons, lists, and flows
* `template`: Message templates
* `reaction`: Emoji reactions to messages

## Authentication

Use the `hmat_` channel token from `GET /meta/channels/{id}/token` or `hookmyapp channels env <channel>`. Do not use an `hmok_` API key for this call.

```bash theme={null}
Authorization: Bearer hmat_...
```

## Path parameters

<ParamField path="phoneNumberId" type="string" required>
  The WhatsApp phone number ID for the connected channel.
</ParamField>

## Request body

<ParamField body="messaging_product" type="string" required>
  Always `whatsapp`.
</ParamField>

<ParamField body="to" type="string" required>
  Recipient phone number in international format.
</ParamField>

<ParamField body="type" type="string" required>
  Message type, such as `text`, `image`, `video`, `audio`, `document`, `sticker`, `location`, `contacts`, `interactive`, `template`, or `reaction`.
</ParamField>

## Example

```bash theme={null}
curl -X POST "https://gateway.hookmyapp.com/meta/v22.0/{PHONE_NUMBER_ID}/messages" \
  -H "Authorization: Bearer hmat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "15551234567",
    "type": "text",
    "text": {
      "body": "Hello! Your order #12345 has been shipped."
    }
  }'
```

## Successful response

```json theme={null}
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "15551234567",
      "wa_id": "15551234567"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgNMTU1NTE0OTU5Nzg1FQIAERgSMDhGRjdBMDEyOTcxQzFFQkFBAA=="
    }
  ]
}
```

## Supported message types

Use the guide pages for copy-paste examples:

* [Text](/whatsapp/send-messages/text)
* [Buttons](/whatsapp/send-messages/buttons)
* [Lists](/whatsapp/send-messages/lists)
* [Image](/whatsapp/send-messages/image)
* [Video](/whatsapp/send-messages/video)
* [Audio](/whatsapp/send-messages/audio)
* [Document](/whatsapp/send-messages/document)
* [Sticker](/whatsapp/send-messages/sticker)
* [Location](/whatsapp/send-messages/location)
* [Contact](/whatsapp/send-messages/contact)
* [Reaction](/whatsapp/send-messages/reaction)
* [Mark messages as read](/whatsapp/send-messages/mark-read)

<Warning>
  Sandbox sessions reject template messages. Test templates against a connected WhatsApp number.
</Warning>
