Message Payloads
Last updated
Was this helpful?
Was this helpful?
> Wait()
{
"content": {
"duration": 1000
},
"content_type": "wait"
}> Url()
{
"content": {
"url": "https://example.com",
"title": "title",
"text": "text"
},
"content_type": "url"
}> Image()
{
"content": {
"url": "https://example.com/image.jpg",
},
"content_type": "image"
}> Audio()
{
"content": {
"url": "https://example.com/audio.mp3",
},
"content_type": "audio"
}> Video()
{
"content": {
"url": "https://example.com/video.mp4",
},
"content_type": "video"
}> File()
{
"content": {
"url": "https://example.com/video.mp4",
},
"content_type": "file"
}> Button()
{
"content": {
"title": "Button title",
"payload": "Button payload"
},
"content_type": "button"
}> Payload()
{
"content": {
"payload": "Custom payload"
},
"content_type": "payload"
}> Question()
{
"content": {
"title": "Question",
"buttons": [Button]
},
"content_type": "question"
}// CSML
say Question(
"Where is Brian",
buttons = [
Button("In the kitchen"),
Button("Somewhere else"),
]
)
// JSON output
{
"content": {
"title": "Where is Brian",
"buttons": [
{
"content_type": "button",
"content": {
"title": "In the kitchen",
}
},
{
"content_type": "button",
"content": {
"title": "Somewhere else",
}
},
],
},
"content_type": "question"
}