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. An Instagram messages event notification is sent to your webhook server that contains the button title and an optional payload.

Before you start

This guide assumes you have set up your webhooks server to receive notifications and subscribed your app to Instagram messages and messaging_postbacks events.

You will need:

  • The ID for the Instagram Professional account (IG_ID)
  • The Instagram-scoped ID (IGSID) for the person to whom you are sending the message

Host URL

https://graph.instagram.com

Limitations

This feature is currently not available on desktop.

Send Quick Replies

To send a set of quick replies, send a POST request to the /<IG_ID>/messages endpoint with the following properties:

  • recipient.id set to the Instagram-scoped ID for the person receiving the quick replies
  • messaging_type set to RESPONSE
  • message object with:
    • text set to the text that will prompt a person to click a quick reply
    • quick_replies array containing an object for each quick reply:
      • content_type set to
      • title set to the quick reply text
      • payload set to the content you would like to receive about the quick reply in the webhook notification

Sample Request

Formatted for readability.

curl -X POST "https://graph.instagram.com/v20.0/<IG_ID>/messages"
     -H "Content-Type: application/json"
     -d '{
            "recipient":{
                "id":"<IGSID>"
            },
            "messaging_type": "RESPONSE",
            "message":{
                "text": "<PROMPT_TEXT>",
                "quick_replies":[
                    {
                      "content_type":"text",
                      "title":"<QUICK_REPLY_1>",
                      "payload":"<PAYLOAD_FOR_QUICK_REPLY_1>"
                    },
                    {
                      "content_type":"text",
                      "title":"<QUICK_REPLY_2>",
                      "payload":"<PAYLOAD_FOR_QUICK_REPLY_2>"
                    }
               ]
            }
         }' 

Webhook Event

When a quick reply is selected, a notification will be sent to your webhook server that contains the ID for the Instagram Professional account that owns the quick replies, the time the notification was sent, the Instagram-scoped ID for the person who sent the quick reply, as well as the payload for the specific quick reply that the person selected and the ID for the message.

Sample Notification

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