botspace-logo
Help Center - BotSpace
botspace-logo
Help Center - BotSpace
Types of message payloads

Template

Mayur Morè

Payload of template type

{
"templateId": "text_only_template",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": null,
"templateDesc": {
"body": "This is a text template",
"buttons": [],
"header": {
"is": false,
"type": "image"
}
}
}

Payload of richTempate type - can also have header

{
"templateId": "image_template",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": "https://botspace-uploads.s3.amazonaws.com/6378c52a569ab50016933520/inbox-uploads/637b6a864aae07f7bb26f7e2/44e58f4d-1b80-41c2-9d6a-de8ee9e7af92.png",
"templateDesc": {
"body": "This is an image template.",
"buttons": [],
"header": {
"is": true,
"type": "image"
}
}
}
{
"templateId": "video_template",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": "https://botspace-uploads.s3.eu-west-1.amazonaws.com/6378c52a569ab50016933520/inbox-uploads/637b6a864aae07f7bb26f7e2/7d0c1350-8b72-42cf-986f-1bd9f8231dad.mp4",
"templateDesc": {
"body": "This is a video template",
"buttons": [],
"header": {
"is": true,
"type": "video"
}
}
}
{
"templateId": "document_template",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": "https://botspace-uploads.s3.eu-west-1.amazonaws.com/6378c52a569ab50016933520/inbox-uploads/637b6a864aae07f7bb26f7e2/2348b9d2-68b6-459c-9dab-44c7ab5c2f77.pdf",
"templateDesc": {
"body": "This is a document template",
"buttons": [],
"header": {
"is": true,
"type": "document"
}
}
}

Payload of buttonTemplate type - can also have header

{
"templateId": "button_tempate",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": null,
"templateDesc": {
"body": "This is a button template - Select any one option.",
"buttons": [
{
"type": "QUICK_REPLY",
"label": "Option 1"
},
{
"type": "QUICK_REPLY",
"label": "Option 2"
}
],
"header": {
"is": false,
"type": "image"
}
}
}
{
"templateId": "website_call_template",
"templateArgs": [],
"templateLanguage": "en_US",
"templateVariableCount": 0,
"mediaArg": null,
"templateDesc": {
"body": "This is a call and url template",
"buttons": [
{
"type": "PHONE_NUMBER",
"label": "Call us",
"phoneNumber": "+917888243936"
},
{
"url": "https://bot.space",
"exampleUrl": "",
"type": "URL",
"label": "Website",
"isDynamic": false
}
],
"header": {
"is": false,
"type": "image"
}
}
}

Payload of quickReply type - Replies when clicking template message button

{
"text": "Option 1",
"type": "button"
}
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.