Skip to content

Get download links to the original files of a message's attachments

GET
/openapi/bytefiles/messageattachments/{messageId}/links
curl --request GET \
--url https://open-api.replyco.com/openapi/bytefiles/messageattachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/links \
--header 'Authorization: Bearer <token>'

Returns a direct download link to the original, full-resolution file of every attachment of the message, together with its name, MIME type, size and thumbnail ID.

Using the links:

  • Download a file with a plain GET request to its ‘url’, without the Authorization header
  • Links to files stored by Replyco are valid for about 24 hours. Request fresh links when you need them instead of saving them
  • Links to files hosted by eBay are returned exactly as eBay provided them
  • ‘url’ is null when no download link is available for an attachment

Sample request:

GET /openApi/byteFiles/messageAttachments/3fa85f64-5717-4562-b3fc-2c963f66afa6/links
messageId
required
string format: uuid

The ID of the message to retrieve attachment links for

Returns the list of attachment links; empty when the message has no attachments

Media typeapplication/json
Array<object>

A link to download the original, full-resolution file of a message attachment.

object
fileName

The name of the file including its extension (e.g., “invoice.pdf”, “image.jpg”)

string
nullable
url

Direct download link to the original file. Open it with a plain GET request, without the Authorization header. Links to files stored by Replyco are valid for about 24 hours, so request fresh links instead of saving them. Links to files hosted by eBay are returned exactly as eBay provided them. Null when no download link is available for the attachment.

string
nullable
mimeType

MIME type of the file, detected from its extension (e.g., “image/jpeg”, “application/pdf”)

string
nullable
sizeInKiloBytes

Size of the file in kilobytes, when known

integer format: int32
nullable
previewId

ID of a small 180x120 cropped thumbnail of the attachment, available from GET /openApi/byteFiles/{id}. Null when no thumbnail was generated (for example, for files hosted by eBay)

string format: uuid
nullable

Example

[
{
"fileName": "damaged-parcel.jpg",
"url": "https://files.example.com/attachments/damaged-parcel.jpg?signature=abc123",
"mimeType": "image/jpeg",
"sizeInKiloBytes": 412,
"previewId": "c3d7a1e9-5f2b-4c8d-9e6a-0b4f8d2c7a15"
}
]

User is not authenticated or authorized

Message with the specified ID was not found