Button

Trigger a button click event from an interactive card in your custom app

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Use this endpoint to simulate a button click. Use the message_id and the button payload (found at data["card"]["buttons"][idx]) as the callback when a user clicks on a button.

This endpoint is useful when integrating buttons into your own custom app.

🚧

Button validation

The text, action, flow, data, type must be consistent with the original button constructed in your flow.

Example webhook payload containing a button

📘

Tip: Use the button JSON as the payload

You can take the button JSON payload and use as the params of the endpoint.

{
  "user_id": "1234567890",
  "sender": "bot",
  "text": "Pick your favorite football player [messi] [ronaldo]",
  "timestamp": 1491526647.888284,
  "type": "card",
  "message_id": "MkyL77cf0qmpHpZtr",
  "card": {
    "buttons": [
      {
        "messenger_extensions": null,
        "url": null,
        "text": "Lionel Messi",
        "flow": null,
        "webview_height_ratio": null,
        "image_url": null,
        "type": "transition",
        "action": "messi",
        "data": {
          "age": 29
        },
        "fallback_url": null
      },
      {
        "messenger_extensions": null,
        "url": null,
        "text": "Cristiano Ronaldo",
        "flow": null,
        "webview_height_ratio": null,
        "image_url": null,
        "type": "transition",
        "action": "ronaldo",
        "data": {
          "age": 32
        },
        "fallback_url": null
      }
    ],
    "text": "Pick your favorite football player",
    "type": "text_buttons",
    "mode": "default"
  },
  "bot_id": "BJty7evfw2b"
}
Body Params
string
Defaults to Meya user id in the format `Uxxxxxxxx`. If set, `integration` and `user_id` are not required.
string
Defaults to Integration specific user id. [Learn more](http://docs.meya.ai/reference#section-integration-specific-user-id)
string
Defaults to String representation of the integration [Learn more](http://docs.meya.ai/reference#section-integration-specific-user-id)
string
required

Unique message id of the message that contains the button. ex. Mxxxxxxxxxx

string
required

What type of button. One of transition or start

string
required

The original text of the button

string

Required for transition button, and optional for start button

string

Name of flow to invoked. Required for start button.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json