image
To send images, use the image
reply type.
tip
You can also use the equivalent
image
DSL tag.Properties
Property | Type | Required | Description |
---|---|---|---|
imageUrl | String | Yes | Image URL. |
imageName | String | No | Image caption. Can be aliased as text or caption . |
markup | String | No | Markup applied to image caption (available for the chat widget, Chat API, and Telegram). Acceptable values are html and plain (default value is plain ). |
Syntax
{
"type": "image",
"imageUrl": "https://example.com/image.png",
"text": "See the <b>image</b>",
"markup": "html"
}
Channel restrictions
image
is not supported in the following channels:
- Chat2Desk
- Slack
- Webim (Custom Channel API)
- Zendesk Chat
How to use
state: Discount
a: Take advantage of our special hot deal and get 10% off tickets to Bangkok!
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "image",
"imageUrl": "https://example.com/bangkok.jpg"
});