Back to All

Creating Button via JSON API

Hi there, I would like to know what is the right language to use to create a message via JSON APIs that has a text button that connects to an interaction ID and continues the flows.

It should be something like this, but the "cards" nesting attributes would be different, I am looking for those attributes names:

{
"user_id": "4182222222",
"bot_id": "120700",
"module_id": "188844355",
"message": "Click on the relevant button",

////from here below it would need to change////////

"cards": [
    {
               "type": "gallery",
               "value": "gallery",
               "gallery": [
                    {
                            "image": "{{3.url}}",
                            "heading": "NASA APOD for {{3.date}}",
                            "subtitle": Explanation: {{3.explanation}}",
                            "url": "https://apod.nasa.gov/apod/astropix.html",
                            "buttons": [
                                    {
                                           "type": "url",
                                           "value": "https://apod.nasa.gov/apod/astropix.html",
                                           "name": "You can also view it here"
                                 }
                              ]
      }
    ]
  }