On October 29, 2019 we announced a breaking change. That all broadcast API will stop working on March 4th, 2020. Matching the deprecation date set by the policy update shared on August 29, 2019.
We recommend apps to migrate to the new policy and migrate to use the Send API as soon as possible.
The Messenger Platform's Broadcast API allows you to broadcast a message to everyone that currently has an open conversation with your Page or a custom set of people.
The broadcast message is displayed on the Page inbox only when a user replies in a thread.
For more information on using the Broadcast API, see Broadcasting Messages to Multiple Conversations.
A page access token with pages_messaging
permission is required to interact with this endpoint. Also the Page must have been approved for Subscription Messaging
feature. See Page Subscription Messaging
Apps in Development Mode, are restricted to message people that have a role in the app. Additionally Pages in unpublished
status will only be allowed to message people with a role on the Page.
https://graph.facebook.com/v9.0
/me/message_creatives?access_token=<PAGE_ACCESS_TOKEN>
https://graph.facebook.com/v9.0
/me/broadcast_messages?access_token=<PAGE_ACCESS_TOKEN>
curl -X POST -H "Content-Type: application/json" -d '{
"messages": [
{
"attachment":{
"type":"template",
"payload":{
"template_type":"generic",
"elements":[
{
"title":"Welcome to Our Marketplace!",
"image_url":"https://www.facebook.com/jaspers.png",
"subtitle":"Fresh fruits and vegetables. Yum.",
"buttons":[
{
"type":"web_url",
"url":"https://www.jaspersmarket.com",
"title":"View Website"
}
]
}
]
}
}
}
]
}' "https://graph.facebook.com/v9.0
/me/message_creatives?access_token=<PAGE_ACCESS_TOKEN>"
curl -X POST -H "Content-Type: application/json" -d '{
"message_creative_id": <MESSAGE_CREATIVE_ID>,
"notification_type": "SILENT_PUSH",
"messaging_type": "MESSAGE_TAG",
"tag": "NON_PROMOTIONAL_SUBSCRIPTION"
}' "https://graph.facebook.com/v9.0
/me/broadcast_messages?access_token=<PAGE_ACCESS_TOKEN>"
Property | Type | Description |
---|---|---|
| Array | The messages to send. For information on supported message types, see Broadcasting Messages. |
Property | Type | Description |
---|---|---|
| Integer | The |
| String | Optional. Push notification type:
Defaults to |
| String | Must be set to |
| String | Must be set to |
{
"message_creative_id": 938461089,
}
Property | Type | Description |
---|---|---|
| Integer | The unique ID of the message creative. |
{
"broadcast_id": 827
}
Property | Type | Description |
---|---|---|
| Integer | The unique ID of the sent broadcast. |
Broadcast API reach is limited to 10,000 recipients per message. Depending on the audience size, messages might not be sent all at once.
To avoid hitting this limit the suggestion is to target smaller audiences by using Targeting Broadcast Messages.
Calls to the broadcast API are rate limited to 10 calls per 60 seconds per page; calls that exceed this rate will fail with error code 613.