API References

The Marketing Message API for Messenger is available exclusively to tech providers with an existing app that has successfully completed Meta App Review for the following permissions:

  • ads_management
  • pages_messaging
  • paid_marketing_messages

Currently, tech providers can only serve businesses located in the following regions:

  • Australia
  • Brazil
  • Chile
  • Colombia
  • Hong Kong
  • India
  • Indonesia
  • Israel
  • Malaysia
  • Mexico
  • New Zealand
  • Peru
  • Philippines
  • Saudi Arabia
  • Singapore
  • Taiwan
  • Thailand
  • United Arab Emirates
  • United States
  • Vietnam (VN)

In addition, messages can be sent to users/subscribers in all regions except:

  • European Union
  • Japan
  • South Korea
  • Australia
  • United Kingdom

The Marketing Message API for Messenger is only available for Web applications.

Overview

Below this page you will find examples of different message requests that can be made and variety of templates we offer as well as guidance for setup. The templates we currently support are:

For all templates the following request URI will be used:

      https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/messages?access_token={PAGE_ACCESS_TOKEN}
    

API Errors

NamespaceNameCodeDescription

MARKETING_MESSAGES_DIRECT

INACTIVE_CAMPAIGN

2300000

You cannot send a message unless the message campaign under which the message exists is active.

MARKETING_MESSAGES_DIRECT

INVALID_MESSAGE_ID

2300001

The message ID you supplied is invalid. The message with this ID either does not exist, or you do not have the permission to load it.

MARKETING_MESSAGES_DIRECT

INACTIVE_MESSAGE_SET

2300002

Messages cannot be sent if the message set under which the message exists is inactive. Please make sure your message set is activated.

MARKETING_MESSAGES_DIRECT

INACTIVE_MESSAGE

2300003

The message must be in active status before it can be sent.

MARKETING_MESSAGES_DIRECT

INVALID_MESSENGER_SUBSCRIPTION_TOKEN

2300004

The subscription token you passed in could not be loaded. This could be because the token id you passed was invalid - or you may not have permissions to load it.

MARKETING_MESSAGES_DIRECT

PAGE_ID_MISMATCH

2300005

The page id behind your message does not match the page id on the messenger subscription token. Pages can only message their own subscribers.

MARKETING_MESSAGES_DIRECT

MESSAGE_CAMPAIGN_IS_NOT_DIRECT_SEND

2300006

Direct send messages can only be sent if the message campaign is created as a direct send campaign. Make sure you set is_direct_send = true when creating the campaign.

MARKETING_MESSAGES_DIRECT

LIFETIME_BUDGET_AND_DAILY_BUDGET_MISSING

2300007

You need to pass in at least one of the two fields: lifetime_budget or daily_budget.

MARKETING_MESSAGES_DIRECT

FAIL_TO_GET_DEFAULT_BID_AMOUNT

2300008

Failed to get the default bid amount for the message campaign.

MARKETING_MESSAGES_DIRECT

MISSING_CAMPAIGN_METADATA

2300009

The campaign metadata does not exist for the given message.

MARKETING_MESSAGES_DIRECT

INVALID_MESSAGE_CREATIVE

2300010

There is no valid message creative/payload for the given message sending request.

MARKETING_MESSAGES_DIRECT

MISSING_PAYMENT_METHOD

2300011

The payment method is missing for the ad account associated with the message campaign.

MARKETING_MESSAGES_DIRECT

CAMPAIGN_POPULATING_IN_PROGRESS

2300012

The message campaign is still being populated. Please try again later.

MARKETING_MESSAGES_DIRECT

TERM_OF_SERVICE_NOT_ACCEPTED

2300013

The business has not accepted the terms of service for marketing messages.

MARKETING_MESSAGES_DIRECT

AD_ACCOUNT_NOT_MATCH

2300014

The ad account associated with the message campaign does not match the ad account associated with the request.

MARKETING_MESSAGES_DIRECT

BUDGET_REACHED

2300015

The budget for the message campaign has been reached.

MARKETING_MESSAGES_DIRECT

BID_TOO_LOW

2300016

The bid amount is too low. Please increase the bid amount.

MARKETING_MESSAGES_DIRECT

AD_ACCOUNT_SPEND_LIMITATION_REACHED

2300017

The ad account has reached its spend limitation.

MARKETING_MESSAGES_DIRECT

REGION_NOT_SUPPORTED

2300018

The ad account/page/subscriber is not in the supported region.

MARKETING_MESSAGES_DIRECT

PARTNER_TOS_NOT_ACCEPTED

2300019

The app has not accepted the terms of service for using Marketing Message API for Messenger. Please go to the app dashboard -> Messenger -> Messenger API Settings to accept the terms of service.

MARKETING_MESSAGES_DIRECT

INVALID_PACING_TYPE

2300020

The pacing type for direct send is invalid.

MARKETING_MESSAGES_DIRECT

AD_ACCOUNT_REGION_NOT_SUPPORTED

2300030

The ad account is not in a supported region.

MARKETING_MESSAGES_DIRECT

PAGE_REGION_NOT_SUPPORTED

2300031

The page is not in a supported region.

MARKETING_MESSAGES_DIRECT

SUBSCRIPTION_TOKEN_REGION_NOT_SUPPORTED

2300032

The subscription token is not in a supported region.