Skip to content

Button Template

Updated: Oct 23, 2025

The button template sends a text message with up to three attached buttons. This template is useful for offering the message recipient a button link to your webpage or setup a webhook for automatic replies to users. As of now, available buttons supported by the API include:

{  
  "message_id": "<MESSAGE_ID>",  
  "messenger_delivery_data": {  
    "subscription_token": "<SUBSCRIPTION_TOKEN>"  
  },  
  "message": {  
    "attachment": {  
      "type": "template",  
      "payload": {  
        "template_type": "button",  
        "text": "Welcome!",  
        "buttons":[  
          {  
            "type":"web_url",  
            "url":"<BUTTON_URL>",  
            "title":"View Website"  
          },{  
            "type":"postback",  
            "title":"Start Chatting",  
            "payload":"<PAYLOAD_WEBHOOK>"  
          }  
        ]  
      }  
    }  
  }  
}

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About