> ## 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 an Instagram DM.

Send an Instagram DM through a connected HookMyApp channel.

Use the connected Instagram account ID in the path. Use the inbound `sender.id` as the outbound `recipient.id`.

Supports Instagram message types:

* `text`: Plain text replies
* `image`, `audio`, `video`: Media messages
* `quick_replies`: Quick reply prompts
* `generic` cards: Cards and carousels
* `reaction`: Message reactions
* `sender_action`: Typing indicators and other sender actions

## 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="instagramAccountId" type="string" required>
  The connected Instagram account ID.
</ParamField>

## Request body

<ParamField body="recipient.id" type="string" required>
  Instagram-scoped sender ID (IGSID) from the inbound webhook `sender.id`.
</ParamField>

<ParamField body="message" type="object" required>
  The Instagram message payload, such as text, media attachment, quick replies, cards, reactions, or sender actions.
</ParamField>

## Example

```bash theme={null}
curl -X POST "https://gateway.hookmyapp.com/meta/v25.0/{INSTAGRAM_ACCOUNT_ID}/messages" \
  -H "Authorization: Bearer hmat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "recipient": { "id": "17841400000000001" },
    "message": { "text": "Hello from HookMyApp" }
  }'
```

## Successful response

```json theme={null}
{
  "recipient_id": "17841400000000001",
  "message_id": "m_0AbCdEfGhIjKlMnOpQrSt"
}
```

## Supported message types

Use the guide pages for copy-paste examples:

* [Text](/instagram/send-messages/text)
* [Image](/instagram/send-messages/image)
* [Audio](/instagram/send-messages/audio)
* [Video](/instagram/send-messages/video)
* [Quick replies](/instagram/send-messages/quick-replies)
* [Cards](/instagram/send-messages/card)
* [Reactions](/instagram/send-messages/react)
* [Sender actions](/instagram/send-messages/sender-actions)

Instagram enforces the standard messaging window. Plain replies outside the allowed window are rejected by Meta.
