Skip to content

Message

Field Required Type Description Restriction
quickReply false Object Contains quickReply items array
Field Required Type Description Restriction
type true String action
imageUrl false String URL of the icon that is displayed at the beginning of the button

  • Max characters: 1000
action false Object Action performed when the button is tapped (see Action Schema)
"quickReply": {
"items": [
{
"type": "action",
"action": {
"type":"message",
"label":"Yes",
"text":"Yes"
}
}
]
}
Field Required Type Description Restriction
type true String message
text true String Message text
// Example - Text Message
{
"type": "text",
"text": "Hello, world"
},
{
"type": "text",
"text": "https://megabot-livechat-prod.s3.ap-southeast-1.amazonaws.com/%file.xlsx"
}
Field Required Type Description Restriction
type true String image
originalContentUrl true String Image URL
  • Max characters: 1000
previewImageUrl true String Preview image URL
  • Max characters: 1000
// Example - Text Message
{
"type": "image",
"originalContentUrl": "https://example.com/original.jpg",
"previewImageUrl": "https://example.com/preview.jpg"
}
Field Required Type Description Restriction
type true String video
originalContentUrl true String URL of video file
  • Max characters: 1000
previewImageUrl true String URL of preview image
  • Max characters: 1000
{
"type": "video",
"originalContentUrl": "https://example.com/original.mp4",
"previewImageUrl": "https://example.com/preview.jpg",
"trackingId": "track_id"
}
Field Required Type Description Restriction
type true String audio
originalContentUrl true String URL of audio file
  • Max characters: 1000
duration true Number Length of audio file (milliseconds)
{
"type": "audio",
"originalContentUrl": "https://example.com/original.m4a",
"duration": 60000
}
Field Required Type Description Restriction
type true String imagemap
baseUrl true String Base URL of the image

  • Max characters: 1000
baseSize.width true Number Width of base image in pixels.
baseSize.height true Number Height of base image in pixels.
actions true Array Action when tapped (see Action Schema)
  • Max: 50
{
"type": "imagemap",
"baseUrl": "https://example.com/bot/images/rm001",
"baseSize": {
"width": 1040,
"height": 1040
},
"actions": [
{
"type": "uri",
"linkUri": "https://example.com/",
"area": {
"x": 0,
"y": 586,
"width": 520,
"height": 454
}
}
]
}
Field Required Type Description Restriction
type true String template
template true Object See “Template” schema