> ## 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.

# Marketing messages

> Send WhatsApp marketing templates through Meta's Marketing Messages API.

Meta is moving WhatsApp marketing templates to a separate endpoint, `/marketing_messages`.\

You send the same marketing template you send today, to a different path.

## Meta's dates

* **April 13, 2027:** WhatsApp accounts created on or after this date can't send marketing templates through `/messages`. They send them through `/marketing_messages`.
* **October 13, 2027:** Meta stops accepting marketing templates on `/messages` for every account.

These dates only affect marketing templates.

## Join the Marketing Messages API

Each WhatsApp business accepts Meta's Marketing Messages terms once.\

When you connect a WhatsApp number to HookMyApp, Meta offers the terms as one of the connect steps.\

If you skipped that step, someone with full control of the business portfolio can accept them in WhatsApp Manager:

1. Open **WhatsApp Manager** and go to **Overview**.
2. In **Alerts**, click **Accept terms**.
3. Follow the steps to finish.

After that, the business can send through `/marketing_messages`.

## Send a marketing message

> [!WARNING]
>
> The sandbox blocks template sends.\\
>
> Test marketing messages against a connected WhatsApp number, not the sandbox.

```bash theme={null}
curl -X POST "https://gateway.hookmyapp.com/meta/v22.0/${WHATSAPP_PHONE_NUMBER_ID}/marketing_messages" \
  -H "Authorization: Bearer ${WHATSAPP_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "15551234567",
  "type": "template",
  "template": {
    "name": "spring_sale",
    "language": {
      "code": "en_US"
    }
  }
}'
```

The body is the same as a template send on `/messages`.\

The response has the same shape too, with the message ID in `messages[0].id`.\

Retry safely with an `Idempotency-Key` header, the same way as on `/messages`.

## Optional fields

| Field | What it does |
| - | - |
| `product_policy` | `CLOUD_API_FALLBACK` sends the message through `/messages` if the business hasn't joined yet. `STRICT` fails the send instead. |
| `message_activity_sharing` | Set to `false` to stop sharing this message's activity with Meta. |

## Message activity and Meta

Meta uses message activity, such as delivered, read, and clicked, to optimize marketing messages.\

When you leave out `message_activity_sharing`, your account's default setting applies.\

Change that default in Meta Business Settings, or set `message_activity_sharing` to `false` on a single message.

## Billing

A marketing message counts as one action, the same as any other message you send.\

Failed sends are free.\

Meta bills marketing messages directly, as it does today. See [Pricing](https://docs.hookmyapp.com/whatsapp/faq/pricing.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.