> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/partner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/partner/messaging/marketing-messages/onboarding-and-sending-messages.md).

# Onboarding and Sending Messages

In MM API, we call *onboarding* the process where the **client** reviews and accepts the MM API **Terms of Service**. The Onboarding is always performed at a **Business Manager** level. Please see the next steps to onboard to MM API:

## Onboarding Link in the Partner Hub

To streamline client onboarding, partners will now see a banner in the Partner Hub. This banner contains a unique link that you can easily share with your clients to begin the MM API onboarding process.

<div align="right"><figure><img src="/files/89G1AOVpjsY7ipwyFzlV" alt=""><figcaption></figcaption></figure></div>

Follow the link below:

```
https://hub.360dialog.com/mmlite-tos
```

### How to use that?

To use the onboarding link, you must copy and share [this link](https://hub.360dialog.com/mmlite-tos) with your clients.

Once the client uses the link, they will be prompted to connect to their Facebook account. They can then complete the embedded signup process for the MM API.

<div align="right"><figure><img src="/files/XvOFmKmsK7gHsSLoAvZr" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Important:** This step requires the client to be an **administrator** of the Business Portfolio or Business Manager.

The terms accepted in this process will apply to all existing WhatsApp Business Accounts (WABAs) under the selected Business Manager. Clients with multiple Business Managers must repeat the process for each BM.
{% endhint %}

## Self-Onboard using WhatsApp Manager

### What is it?

This is the best way to get access to the MM API feature. In this case, you can use the WhatsApp Business Manager to accept the terms.

### How it works

{% stepper %}
{% step %}

#### Open [**WhatsApp Manager** > **Overview**](https://business.facebook.com/latest/whatsapp_manager/overview)

{% endstep %}

{% step %}

#### In the Alerts section, click '**Accept terms to get started**' for Marketing Messages API.

<div align="right"><figure><img src="/files/3s5E6QxdUub2YEAI7Mi6" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Follow the steps to finish signing the **MM API Terms of Service** for **all eligible WABAs** in the account.

<div align="right"><figure><img src="/files/JrdoKhzMO4nWBm4ssbOP" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
If the user does not have full admin permissions to manage all the client's accounts, the user will need to ask each client to follow the same process described in [this step-by-step guideline](https://docs.360dialog.com/docs/waba-messaging/sending-marketing-messages/onboarding-and-sending-messages).
{% endhint %}

***

### Onboarding Confirmation

Once accepted, the **MM API is active** for that Business Manager, meaning all eligible WABAs in the client's account will be allowed to use MM API.

This webhook is the **recommended way** to track onboarding and eligibility status. Once received, you can safely assume that **the WABA is enabled to send messages** **through** the **MM API**.

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "<BUSINESS_ID>",
      "time": "<WEBHOOK_TIMESTAMP>",
      "changes": [
        {
          "field": "account_update",
          "value": {
            "event": "MM_LITE_TERMS_SIGNED",
            "waba_info": {
              "owner_business_id": "<BUSINESS_PORTFOLIO_ID>",
              "waba_id": "<WABA_ID>"
            }
          }
        }
      ]
    }
  ]
}
```

#### Notes:

* [x] A webhook can be sent **per WABA** or **once per business** (in which case, all WABAs under that business become eligible).
* [x] <mark style="color:$success;">`waba_id`</mark> indicates **which WhatsApp Business Account** is now enabled.
* [x] <mark style="color:$success;">`owner_business_id`</mark> can be used to match the WABA with the correct **Business Manager** in your system.
* [x] Receiving this webhook means the WABA is **ready to send messages via the MM API**.

***

## Sending Messages with MM API

To send a marketing template message, please use this [endpoint](https://docs.360dialog.com/docs/messaging-api/api-reference/marketing-messages#post-marketing-marketing_messages).

{% hint style="danger" %}
The only difference is the endpoint <mark style="color:red;">/marketing\_messages</mark>, and it should be used **only** for *Marketing* messages.
{% endhint %}

{% hint style="info" %}
If you do not want to implement the new endpoint, please use our **fallback system** explained [here](#fallback-mechanism).
{% endhint %}

### Fallback Mechanism

A new option is now available to route marketing messages via the MM API when possible. If a message is ineligible, it will automatically fall back to the Cloud API.

**Benefits**

* Continue using the standard [endpoint](https://docs.360dialog.com/docs/messaging-api/api-reference/messages#post-messages).
* All marketing messages submitted through the `/messages` endpoint will be automatically forwarded to the MM API *if the business is currently onboarded* with the MM API. This routing logic is handled automatically.

{% hint style="danger" %}
This feature applies to **all channels/numbers** under your Partner ID when enabled. It is **enabled by default** for all existing and new numbers.

* To opt out of this feature, please follow the steps below.
* To opt in or out for a specific channel/number, please reach out to our support team.
  {% endhint %}

{% hint style="warning" %}
Messages sent very close to a Meta template recategorization may still pass through the Cloud API until the updated category is reflected in our cache.

The recommended approach to achieve 100% of marketing templates going through the MM API and having a better performance is to use the dedicated MM API endpoint `/marketing_messages`
{% endhint %}

{% hint style="info" %}
For **more details**, please check [this specific section](/partner/messaging/marketing-messages/technical-details-for-mm-api.md) about MM API technical implementation.
{% endhint %}

#### How to enable or disable it?

If you want to enable/disable this option, please follow the steps below:

#### **Via Partner Hub UI:**

{% stepper %}
{% step %}

#### Access the partner hub and log in to your account [here](https://hub.360dialog.com/).

{% endstep %}

{% step %}

#### Go to the Integration tab

<figure><img src="/files/491eWf2ScAQ1k6aK0OoG" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Under Integration Settings > Route Marketing via MM API

<figure><img src="/files/E7dIKurPQknJx8Emtg7C" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

#### **Via API**

Please use this [endpoint](/partner/partner-api/api-reference/settings.md#patch-api-v2-partners-partner_id-settings-marketing_templates_routing).&#x20;

### S**ending a Marketing Template Message with TTL using MM API**

MM API provides additional features that are not available to Marketing templates on Cloud API.&#x20;

This means you can include and set the value of the `message_send_ttl_seconds`  in the payload of your Marketing Message Template to test this feature.

{% hint style="info" %}
***What is*** [***Time-To-Live (TTL)***](/partner/messaging/template-messages/sending-template-messages.md#time-to-live) ***for Marketing template messages?***

If Meta is unable to deliver a message to a WhatsApp user, they will continue attempting to deliver the message for a period of time known as a time-to-live (TTL), or message validity period.&#x20;

TTL is available for Authentication and Utility template messages on Cloud API, but TTL for Marketing template messages is exclusively available on Marketing Messages API.&#x20;

[*See our documentation on How to set a TTLs for Marketing template messages.*](/partner/messaging/template-messages.md#customizing-time-to-live)
{% endhint %}

## Handling Webhooks

With MM API, you don’t need to change your webhook setup. You will keep receiving the usual events (**sent → delivered → read**) the same way as with the Cloud API.

The only difference: when you send via <mark style="color:$success;">**`/marketing_messages`**</mark> with <mark style="color:$success;">`"message_activity_sharing": true`</mark>, you also get a **click event** whenever a user taps the CTA link in your template.

This makes it easier to track performance and optimize campaigns without changing your current logic.

#### Tracking click events limitations

* At the moment, it’s not possible to know *which phone number* clicked. You only get the event itself.
* This feature is not available for all users.
* Click events are only available for messages sent in the last 7 days.

#### Webhook events received:

{% tabs %}
{% tab title="Sent" %}
This event includes the value <mark style="color:$success;">`"marketing_lite"`</mark> to indicate that it was sent using the MM API:

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
              "phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
            },
            "statuses": [
              {
                "id": "<WHATSAPP_MESSAGE_ID>",
                "status": "sent",
                "timestamp": "TIMESTAMP",
                "recipient_id": "<CUSTOMER_PHONE_NUMBER>",
                "conversation": {
                  "id": "<conversation_id>",
                  "expiration_timestamp": "TIMESTAMP",
                  "origin": {
                    "type": "marketing_lite"
                  }
                },
                "pricing": {
                  "billable": true,
                  "pricing_model": "CBP",
                  "category": "marketing_lite"
                }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="Delivered" %}

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
              "phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
            },
            "statuses": [
              {
                "id": "<WHATSAPP_MESSAGE_ID>",
                "status": "delivered",
                "timestamp": "TIMESTAMP",
                "recipient_id": "TIMESTAMP",
                "conversation": {
                  "id": "<conversation_id>",
                  "origin": {
                    "type": "marketing_lite"
                  }
                },
                "pricing": {
                  "billable": true,
                  "pricing_model": "CBP",
                  "category": "marketing_lite"
                }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="Read" %}

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
              "phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
            },
            "statuses": [
              {
                "id": "<WHATSAPP_MESSAGE_ID>",
                "status": "read",
                "timestamp": "TIMESTAMP",
                "recipient_id": "<CUSTOMER_PHONE_NUMBER>"
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="Click Event" %}
The **click event** will display a <mark style="color:$success;">`click_id`</mark> and a <mark style="color:$success;">`tracking_token`</mark>

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
              "phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
            },
            "user_actions": [
              {
                "timestamp": "TIMESTAMP",
                "action_type": "marketing_messages_link_click",
                "marketing_messages_link_click_data": {
                  "tracking_token": "<TRACKING_TOKEN>",
                  "click_id": "<CLICK_ID>",
                  "click_component": "CTA"
                }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you want to obtain more details about the webhook events, please see the Meta doc [here](https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/track-click-events).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.360dialog.com/partner/messaging/marketing-messages/onboarding-and-sending-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
