Common properties
Section titled “Common properties”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| quickReply | false | Object | Contains quickReply items array |
Quick Reply - Items
Section titled “Quick Reply - Items”| 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 |
|
| action | false | Object | Action performed when the button is tapped (see Action Schema) |
"quickReply": { "items": [ { "type": "action", "action": { "type":"message", "label":"Yes", "text":"Yes" } } ]}Text Message
Section titled “Text Message”| 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"}Image Message
Section titled “Image Message”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| type | true | String | image | |
| originalContentUrl | true | String | Image URL |
|
| previewImageUrl | true | String | Preview image URL |
|
// Example - Text Message
{ "type": "image", "originalContentUrl": "https://example.com/original.jpg", "previewImageUrl": "https://example.com/preview.jpg"}Video Message
Section titled “Video Message”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| type | true | String | video | |
| originalContentUrl | true | String | URL of video file |
|
| previewImageUrl | true | String | URL of preview image |
|
{ "type": "video", "originalContentUrl": "https://example.com/original.mp4", "previewImageUrl": "https://example.com/preview.jpg", "trackingId": "track_id"}Audio Message
Section titled “Audio Message”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| type | true | String | audio | |
| originalContentUrl | true | String | URL of audio file |
|
| duration | true | Number | Length of audio file (milliseconds) |
{ "type": "audio", "originalContentUrl": "https://example.com/original.m4a", "duration": 60000}Imagemap Message
Section titled “Imagemap Message”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| type | true | String | imagemap | |
| baseUrl | true | String | Base URL of the image |
|
| 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) |
|
{ "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 } } ]}Template Message
Section titled “Template Message”| Field | Required | Type | Description | Restriction |
|---|---|---|---|---|
| type | true | String | template | |
| template | true | Object | See “Template” schema |
Was this page helpful?
Thank you for your feedback!