Message Types: Outbound

Outbound messages

Text

Send simple text messages to your customers. These messages can contain emojis. Links within the text message must be valid formatted URLs.

Text messages must follow the specifications shown in the table below:

Supported formatSize (Maximum)
UTF-81,000 bytes
{
    "type": "text",
    "text": "Hello user, how are you?"
}

Image

Send images to your customers.

Images must follow the specifications shown in the table below:

Supported formatSize (Maximum)
.jpg, .png, .ico, .bmp8 MB
{
    "type": "image",
    "originalUrl": "http://news-events.sleeping-out.co.za/wp-content/uploads/2015/11/rock-climbing.jpg",
    "previewUrl": "http://timelinethumbnailcreator.com/img/icon-brush-256.png"
}

Quick reply

Include quick reply options in the form of buttons. Instead of typing a reply to your message, customers can click these buttons to send you a reply.

You can include up to 13 quick replies in each message. Each quick reply button consists of the following elements.

Button text: 20 characters (maximum)

{
    "type": "quick_reply",
    "content": {
        "type": "text",
        "header": " ",
        "text": "TEXT",
        "caption": " "
    },
    "options": [
        {
            "type": "text",
            "title": "BUTTON_1"
        },
        {
            "type": "text",
            "title": "BUTTON_2"
        }
    ]
}

Quick reply with Postback data

{
    "type": "quick_reply",
    "msgid": "msg001",
    "content": {
        "type": "text",
        "text": "What's your favourite color?"
    },
    "options": [
        {
            "type": "text",
            "title": "Apple",
            "postbackText": "Apple Selected"
        },
        {
            "type": "text",
            "title": "Banana",
            "postbackText": "Banana Selected"
        }
    ]
}

Stickers

React to your customers' messages by sending a sticker as a separate message.

{
    "type": "sticker",
    "url": "url"
}

📘

Only like_heart sticker is supported.

Audio

{
    "type": "audio",
    "url": "https://lookaside.fbsbx.com/"
}

Video

{
    "type": "video",
    "url": "https://lookaside.fbsbx.com/"
}

Generic Template Carousels

{
    "type": "catalogue",
    "msgid": "catalogue_message_1",
    "items": [
        {
            "title": "title",
            "subtitle": "Use code IGEXTRA10 to avail discount.",
            "imgurl": "imgurl",
            "defaultaction": {
                "type": "url",
                "url": "url"
            },
            "options": [
                {
                    "type": "url",
                    "title": "Buy Now",
                    "url": "url"
                },
                {
                    "type": "postback",
                    "title": "Go Back",
                    "postbackText": "Go Back"
                },
                {
                    "type": "postback",
                    "title": "Main Menu",
                    "postbackText": "hi"
                }
            ]
        }
    ]
}

React

{
    "type": "react",
    "msgid": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDUwMjYzNTI0MjU3OjM0MDI4MjM2Njg0MTcxMDMwMDk0OTEyODEzOTYyNDM0ODg0NTYxNzozMDIzNjg5OTU5NjA3NDA5MDExNDg3MTkyNTA3MjE5OTY4MAZDZD",
    "reactionType": "love"
}

Unreact

{
    "type": "unreact",
    "msgid": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDUwMjYzNTI0MjU3OjM0MDI4MjM2Njg0MTcxMDMwMDk0OTEyODEzOTYyNDM0ODg0NTYxNzozMDIzNjg5OTU5NjA3NDA5MDExNDg3MTkyNTA3MjE5OTY4MAZDZD"
}
{
    "type": "catalogue",
    "msgid": "msg001",
    "items": [
        {
            "title": "White T Shirt",
            "subtitle": "Soft cotton t-shirt \nXs, S, M, L \n",
            "imgurl": "https://ichef.bbci.co.uk/news/976/media/images/83351000/jpg/_83351965_explorer273lincolnshirewoldssouthpicturebynicholassilkstone.jpg",
            "defaultaction": {
                "type": "url",
                "title": "View Details",
                "url": "https://ichef.bbci.co.uk/news/976/media/images/83351000/jpg/_83351965_explorer273lincolnshirewoldssouthpicturebynicholassilkstone.jpg"
            },
            "options": [
                {
                    "type": "url",
                    "title": "Go to New FLow",
                    "url": "https://www.messenger.com/t/573295509671844?ref=eyJpbml0RmxvdyI6IkZsb3dCdWlsZGVyMDA5In0="
                },
                {
                    "type": "text",
                    "title": "Buy"
                }
            ]
        },
        {
            "title": "Grey T Shirt",
            "subtitle": "Soft cotton t-shirt \nXs, S, M, L \n",
            "imgurl": "https://static.pexels.com/photos/132037/pexels-photo-132037.jpeg",
            "options": [
                {
                    "type": "url",
                    "title": "View Details",
                    "url": "https://static.pexels.com/photos/132037/pexels-photo-132037.jpeg"
                },
                {
                    "type": "text",
                    "title": "Buy"
                }
            ]
        }
    ]
}

Recurring Notification Optin Request

{
    "type": "notification_optin",
    "imageURL": "https://media.contentapi.ea.com/content/dam/gin/images/2021/06/battlefield-2042-key-art.jpg.adapt.crop1x1.767p.jpg",
    "title": "Recurring Notifications Test",
    "postbackText": "Get the latest updates from the world of gaming",
    "frequency": "DAILY",
    "reOptin": true,
    "timezone": "Asia/Kolkata"
}

Recurring Notification

{
    "type": "text",
    "text": "Hello",
    "notificationToken": "6462548630986684668"
}