file
To send files in a chat, use the file reply type.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
fileUrl | String | Yes | File URL. |
fileName | String | No | File name. |
mimeType | String | No | File media type. |
Syntax
{
"type": "file",
"fileUrl": "https://example.com/file.xlsx",
"fileName": "file.xlsx",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
Channel restrictions
file is only supported in the following channels:
Chat API
Chat widget
edna WhatsApp 2.0
Microsoft Teams
tipThe preferred way of sending files in Microsoft Teams is to use therawreply type.edna.chatCenter
Webim (External Bot API 2.0)
How to use
state: SendManual
a: To configure the service, follow the steps described in the instruction below.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "file",
"fileUrl": "https://example.com/manual.pdf",
"fileName": "manual.pdf",
"mimeType": "application/pdf"
});