messaging_postbacks Webhook Event Reference

Postbacks occur when a postback button, Get Started button, or persistent menu item is tapped.

The payload field passed is defined in the above places.

You can subscribe to this callback by selecting the messaging_postbacks field when setting up your webhook.

Example

{
  "sender":{
    "id":"<PSID>"
  },
  "recipient":{
    "id":"<PAGE_ID>"
  },
  "timestamp":1458692752478,
  "postback":{
    "title": "<TITLE_FOR_THE_CTA>",  
    "payload": "<USER_DEFINED_PAYLOAD>",
    "referral": {
      "ref": "<USER_DEFINED_REFERRAL_PARAM>",
      "source": "<SHORTLINK>",
      "type": "OPEN_THREAD",
    }
  }
}    

Properties

sender

PropertyTypeDescription

id

String

The PSID of the user that triggered the webhook event.

recipient

PropertyTypeDescription

id

String

Your Page ID.

postback

Property Type Description

title

String

Title for the CTA that was clicked on. This is sent to all apps subscribed to the page. For apps other than the original CTA sender, the postback event will be delivered via the standby channel.

payload

String

payload parameter that was defined with the button. This is only visible to the app that send the original template message.

referral

Structure follows referral event

Referral information for how the user got into the thread.

postback.referral

This section is present only if:

The information contained in this section follows that of the referral webhook.