Send a File Message
The Send a File as a Messageallows you to send a file-based RCS message as part of the Message API, enabling businesses to deliver documents such as PDFs, reports, invoices, or other downloadable content directly to users. The message supports a file attachment along with optional metadata like a thumbnail preview and content description, enhancing the overall user experience. This message type is ideal for use cases such as sharing transactional documents, customer reports, brochures, and other rich content that requires download or offline access.
A file message can be sent along with suggestions displayed as chips in the suggestion list.
Payload Structure:
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| From | from | string | Yes | Service code or sender ID. |
| To | to | *string | Yes | Recipient mobile numbers. |
| File | file | *file | Yes | File payload containing the media. |
*file
File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
FileURL |
| string | Yes | File URL - Publicly accessible URL of the file to be sent in the message.
The platform supports the following content types:
Images: image/jpeg, image/jpg, image/gif, image/png. |
ThumbnailUrl |
| string | Yes | Thumbnail URL |
The following is a sample payload for sending a file as a message:
{
"from": "kio_rcs",
"to": ["91XXXXXXXX"],
"file": {
"fileUrl": "https://www.aeee.in/wp-content/uploads/2020/08/Sample-pdf.pdf",
"thumbnailUrl": "https://fastly.picsum.photos/id/8XX/160/2XX.jpg",
"contentDescription": "Tata Cloud AI discussion"
}
}Sample Recipient Details Payload
{
"recipientDetails": [
{
"messageId": "68f1f052-b678-4aa4-8b96-aef3XXXXXb7a",
"to": "917XXXXXX"
}
]
}Updated about 5 hours ago
