Get the content of all attachments of a message
GET
/openapi/bytefiles/messageattachments/{messageId}
const url = 'https://open-api.replyco.com/openapi/bytefiles/messageattachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://open-api.replyco.com/openapi/bytefiles/messageattachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Returns every attachment of the message with its file content embedded in the response.
Each item contains:
- ‘fileName’ - the name of the file including its extension
- ‘fileData’ - the content of the stored file, base64-encoded
The whole content of every attachment is included, so responses for messages with large or many attachments can be big. To get download links to the original files instead, use GET /openApi/byteFiles/messageAttachments/{messageId}/links.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”messageId
required
string format: uuid
The ID of the message to retrieve attachments from
Responses
Section titled “Responses”Returns the list of message attachments
Media typeapplication/json
Array<object>
object
fileName
string
fileData
string format: byte
Example generated
[ { "fileName": "example", "fileData": "example" }]Message with the specified ID was not found or has no attachments
An attachment of the message is stored in an unsupported location
User is not authenticated or authorized