# Marketing messages

Messenger marketing messages allow you to send promotional content to customers who have opted in to receive messages from your Facebook Page outside the standard [24-hour messaging window](https://www.infobip.com/docs/remaining-compliant#responding-to-end-users).

Marketing messages use a **Notification Message Token (NMT)**, which is a separate subscription credential returned through an opt-in webhook. The NMT is different from the Page-Scoped ID (PSID) used in standard Messenger conversations. Always use the NMT as the destination when sending marketing messages.

NMT required
Do not use the regular Facebook user ID or PSID when sending marketing messages. The destination must be the `notificationMessagesToken` returned by the opt-in event.

## Prerequisites

Before you can send marketing messages through Messenger, make sure you have the following:

- An Infobip account with Messenger marketing messages access enabled. Contact your account manager or email messenger@infobip.com to request the feature flag.
- A Facebook Page connected to your Infobip account under **Channels and Numbers > Channels > Messenger > Pages**. The Page does not need to be verified by Meta.
- An ad account connected through the marketing-messages onboarding wizard in the Infobip web interface.
- An API key scoped to call the Messenger APIs.
- A webhook endpoint configured to receive opt-in, opt-out, and delivery events (optional but recommended).

## Connect the Facebook Page and ad account

1. Go to **Channels and Numbers > Channels > Messenger > Pages** and select **Connect Account**.
2. Select **Marketing messages** as the use case.
3. Select your account type. Select **I am admin** only if you are the admin of the business portfolio and both the Page and ad account belong to a single business portfolio.
4. Select **Login with Facebook** and complete the authentication flow.
5. Select one or more Facebook Pages and ad accounts to connect.
6. (Optional) Configure automatic audience growth settings to invite recent subscribers to opt in.
7. Select **Confirm**, then **Finish**.

After the wizard completes, verify the ad account connection under the **Ad Accounts** tab. You can also confirm the setup by calling the ad accounts endpoint:

```bash
GET /messenger/1/ad-accounts
```

Use the returned `id` value as `adAccountId` when creating a campaign.

## Collect the opt-in token

Marketing messages require an NMT collected through the opt-in flow. There are two ways to build the subscriber pool.

The two paths to collect subscription tokens are:

- **Opt-in conversation**: Send an opt-in prompt to a user during an active Messenger conversation (within the 24-hour window). When the user accepts, Infobip receives a `CONSENT_UPDATE` webhook containing the `notificationMessagesToken`.
- **Custom Audiences**: Upload hashed phone numbers or emails through the [Audiences API](https://www.infobip.com/docs/api/channels/messenger/audiences-messenger/create-messenger-audience). Meta matches the data against Facebook profiles and returns subscription tokens for matched users.

### Opt-in webhook

Subscribe to the Messenger `CONSENT_UPDATE` event through [Subscriptions management](https://www.infobip.com/docs/cpaas-x/subscriptions-management). When a user opts in, you receive a webhook with the token:

```json
{
  "results": [
    {
      "channel": "MESSENGER",
      "event": "SUBSCRIBE",
      "sender": "{pageId}",
      "from": "{userId}",
      "createdAt": "2026-01-14T12:00:00.000+0000",
      "channelData": {
        "notificationMessagesToken": "{token}",
        "tokenExpiry": "2030-01-01T00:00:00.000+0000",
        "userTokenStatus": "REFRESHED",
        "notificationMessagesTimezone": "Europe/Warsaw",
        "subscriptionPayload": "promo_campaign_v2",
        "subscriptionTitle": "Get weekly deals"
      }
    }
  ]
}
```

Store the `notificationMessagesToken` value. This is the destination you use when sending a marketing message.

### Opt-out webhook

When a user opts out, you receive an `UNSUBSCRIBE` event with `userTokenStatus: "NOT_REFRESHED"`. Stop using the token for future sends immediately and update your suppression logic.

### List active subscriptions

To check the subscription state for a Page, call the subscriptions endpoint:

```bash
GET /messenger/1/pages/{pageId}/subscriptions
```

The response includes the token, token expiry, and the next eligible send time (`nextEligibleDatetime`).

## Create a campaign

Create a marketing campaign before sending messages. The campaign ties together the Page, the ad account, and the budget.

### Using the API

```bash
POST /messenger/1/campaigns
```

```json
{
  "name": "Summer Sale Campaign",
  "dailyBudget": 1000,
  "adAccountId": "{adAccountId}",
  "pageId": "{pageId}"
}
```

Budget values
Budget values are in cents. Provide at least one of `dailyBudget` or `lifetimeBudget`.

The response returns a `campaignId` that you include in every marketing message send request.

For full endpoint details, see [Create a campaign](https://www.infobip.com/docs/api/channels/messenger/campaigns-messenger/create-messenger-campaign).

### Using the web interface

1. Go to **Channels and Numbers > Channels > Messenger > Campaigns**.
2. Select **Create Campaign**.
3. Enter the campaign name, select the ad account and Facebook Page, and set a lifetime or daily budget.
4. Select **Create**.

## Send a marketing message

### Using the API

Use `POST /messenger/1/messages` with `content.type` set to `MARKETING_MESSAGE` and the NMT as the destination.

```json
{
  "messages": [
    {
      "sender": "{pageId}",
      "destinations": [
        {
          "to": "{notificationMessagesToken}"
        }
      ],
      "content": {
        "type": "MARKETING_MESSAGE",
        "campaignId": "{campaignId}",
        "content": {
          "type": "TEXT",
          "payload": {
            "text": "Hello! Check out our latest offers."
          }
        }
      }
    }
  ]
}
```

A successful response returns a `PENDING_ACCEPTED` status:

```json
{
  "bulkId": "2034072219640523072",
  "messages": [
    {
      "messageId": "2250be2d4219-3af1-78856-aabe-1362af1edfd2",
      "status": {
        "groupId": 1,
        "groupName": "PENDING",
        "id": 26,
        "name": "PENDING_ACCEPTED",
        "description": "Message sent to next instance"
      },
      "destination": "{notificationMessagesToken}"
    }
  ]
}
```

Supported content types for marketing messages: `TEXT`, `GENERIC` (single card or carousel with `web_url`/`postback` buttons), and `BUTTON` (`web_url`/`postback` only).

For full endpoint details, see <apidocslink href="channels/messenger/send-messenger/send-messenger-message">Send a Messenger message</apidocslink>.

### Using Broadcast

Early Access
Sending marketing messages through Broadcast is in Early Access. Contact your account manager for availability.

1. Go to **Broadcast > Create broadcast**.
2. Select **Messenger** as the channel.
3. Add recipients by uploading a file with subscription tokens or selecting a People audience.
4. Select the Messenger sender (Facebook Page) that matches the token source.
5. Select the marketing message content type and the campaign created earlier.
6. Review scheduling and tracking, then preview and launch.

## Rate limits and error codes

Meta enforces a rate limit of one message per 12 hours per subscription token.

| Code | Name | Description |
| --- | --- | --- |
| 2300041 | Campaign not ready | The campaign is not ready for message delivery yet. The response includes `remaining_seconds` to wait before retrying. |
| 2300032 | `SUBSCRIPTION_TOKEN_REGION_NOT_SUPPORTED` | The subscription token region is not supported for marketing messages. |
| 2300035 | `MIN_DELAY_BETWEEN_MESSAGES_NOT_REACHED` | The 12-hour per-token rate limit has not elapsed yet. |

## Compliance

Marketing messages must follow Meta platform policies.

- Send marketing messages only to users who have opted in.
- Stop sending messages to users who have opted out. Remove the token from future sends immediately when you receive the opt-out webhook.
- Do not use marketing messages for service or transactional communications. Use the standard [24-hour messaging window](https://www.infobip.com/docs/remaining-compliant#responding-to-end-users) or [message tags](https://www.infobip.com/docs/message-types#tags) for those purposes.
- Feature availability depends on the country. See the [Meta documentation](https://developers.facebook.com/docs/messenger-platform/marketing-messages) for the list of supported countries.

For general Messenger compliance requirements, see [Compliance and guidelines](https://www.infobip.com/docs/remaining-compliant).

## Troubleshooting

Message accepted but not received

- Confirm the destination is the subscription token, not the PSID or regular user ID.
- Confirm the token has not expired or been revoked by an opt-out event.
- Confirm the tenant has Messenger marketing messages access enabled.
- Confirm a message was not already sent to the same token in the last 12 hours.

Campaign creation fails with 400

- Check that `adAccountId` and `pageId` belong to the same connected setup.
- Provide at least one budget field: `dailyBudget` or `lifetimeBudget`.
- Budget values must be in cents.

No opt-in webhook arrives

- Confirm the webhook subscription is configured for the `CONSENT_UPDATE` event.
- Confirm the user opted in through a supported Messenger flow.
- Verify the webhook endpoint is reachable and returns a 200-level response.