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 NameJSON KeyTypeRequiredDescription
FromfromstringYesService code or sender ID.
Toto*stringYesRecipient mobile numbers.
Filefile*fileYesFile payload containing the media.

*file

File Name

JSON Key

Type

Required

Description

FileURL

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.
Audio: audio/aac, audio/mp3, audio/mpeg, audio/mpg, audio/mp4, audio/mp4-latm, audio/3gpp, application/ogg, audio/ogg.
Video: video/h263, video/m4v, video/mp4, video/mpeg, video/mpeg4, video/webm.
PDF: application/pdf.
The file must be hosted on a publicly accessible HTTPSendpoint and should not require authentication for access.

ThumbnailUrl

thumbnailUrl

string

Yes

Thumbnail URL thumbnailUrl – A publicly accessible URL of the thumbnail corresponding to the file. Supported image content types: image/jpeg, image/jpg, image/gif, image/png. The thumbnail must be hosted on a publicly accessible HTTPS endpoint and should not require authentication for access.

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"
        }
    ]
}






© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.