Broadcast API Reference

Graph API v2.11 Required

This API is available only in Graph API v2.11 and above.

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.

For more information on using the Broadcast API, see Broadcasting Messages to Multiple Conversations.

Contents

Request URI

Create Message Creative

https://graph.facebook.com/v2.11/me/message_creatives?access_token=<PAGE_ACCESS_TOKEN>

Send Broadcast

https://graph.facebook.com/v2.11/me/broadcast_messages?access_token=<PAGE_ACCESS_TOKEN>

Example Request

Create Message Creative

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/v2.11/me/message_creatives?access_token=<PAGE_ACCESS_TOKEN>"

Send Broadcast

curl -X POST -H "Content-Type: application/json" -d '{    
  "message_creative_id": <MESSAGE_CREATIVE_ID>,,
  "notification_type": "<REGULAR | SILENT_PUSH | NO_PUSH>",
  "tag": "<MESSAGE_TAG>"
}' "https://graph.facebook.com/v2.11/me/broadcast_messages?access_token=<PAGE_ACCESS_TOKEN>"

Properties

Create Message Creative

Property Type Description

messages

Array

The messages to send.


For information on supported message types, see Broadcasting Messages.

Send Broadcast

Property Type Description

message_creative_id

Integer

The message_creative_id of the message creative to send in the broadcast.

notification_type

String

Optional. Push notification type:

  • REGULAR: sound/vibration
  • SILENT_PUSH: on-screen notification only
  • NO_PUSH: no notification

Defaults to REGULAR.

tag

String

Optional. The message tag string. See Message Tags.

Response

Create Message Creative

{
  "message_creative_id": 938461089,
}
Property Type Description

message_creative_id

Integer

The unique ID of the message creative.

Send Sponsored Message

{
  "broadcast_id": 827  
}
Property Type Description

broadcast_id

Integer

The unique ID of the sent broadcast.