Start Story/Media Block from External API in Chatbot

Written by Hasan Rizvi
Posted On Feb, 16, 2018
It is now possible to start any Story or Media Block of Botsify from the external APIs, just need to modify something in JSON Formats that you are sending Where ever you are sending button object you need to set Type of that button is “postback” and set the payload in button object. If you want to start any story with your button go to Manage Stories from the left sidebar where all the stories are listed. Copy the payload of the story which you want to trigger by clicking the middle button on the top right of each story. Paste the copied payload to the button object in JSON      
"buttons":[
{

"type":"postback",

"title":"My Story",

"payload":"STORY_ID-53856",

},

]
    Similarly you can start media block too with external API,  you can find the payload of the Media Block from Media Block Options on the left sidebar as following image     and paste the copied payload as the value of payload in the button object in your JSON like following  
"buttons":[
{

"type":"postback",

"title":"Media Block Title",

"payload":"TEMPLATE_ID-19534",

},

]