Quick Replies

Quick replies provide a way to present a set of buttons in-conversation for users to reply with. A maximum of 13 quick replies are supported and each quick reply allows up to 20 characters before being truncated. Quick replies only support plain text.

When a quick reply is tapped, the buttons are dismissed, and the title of the tapped button is posted to the conversation as a message. A messages event will be sent to your webhook that contains the button title and an optional payload.

Sending Quick Replies

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{
    "id":"<IGSID>"
  },
  "messaging_type": "RESPONSE",
  "message":{
    "text": "<SOME_TEXT>",
    "quick_replies":[
      {
        "content_type":"text",
        "title":"<TITLE_1>",
        "payload":"<POSTBACK_PAYLOAD_1>"
      },
      {
        "content_type":"text",
        "title":"<TITLE_2>",
        "payload":"<POSTBACK_PAYLOAD_2>"
      }
    ]
  }
}' "https://graph.facebook.com/v8.0/me/messages?access_token=<PAGE_ACCESS_TOKEN>"

Webhook Event

When a quick reply is tapped, a text message will be sent to your message webhook.

The text property of the event will correspond to the title of the Quick Reply. The message object will also contain a field named quick_reply containing the payload data on the Quick Reply.

{
  "object": "instagram",
  "entry": [
    {
      "id": "<IGSID>",
      "time": 1502905976963,
      "messaging": [
        {
          "sender": {
            "id": "<IGSID>"
          },
          "recipient": {
            "id": "<IGID>"
          },
          "timestamp": 1502905976377,
          "message": {
            "quick_reply": {
              "payload": "<PAYLOAD>"
            },
            "mid": "<MID>",
            "text": "<SOME_TEXT>"
          }
        }
      ]
    }
  ]
}