Skip to content

Ticket files

A ticket file is a file attached to a ticket as a whole rather than to one of its messages: a document an agent added in Replyco, or the invoice of the ticket’s order that an order-management integration brought in. Files that arrive with a customer’s message are message attachments; read those with GET /openapi/bytefiles/messageattachments/{messageId}/links (see Files).

Field Meaning
id The file’s id.
name The file name, with its extension.
size The size in bytes.
isOrderInvoice true for an order’s invoice, false for a file an agent added.
url Where Replyco stores the file: a storage reference, not a link you can download from.

GET /openapi/threadattachment/paged returns one page of all your company’s ticket files.

Parameter What it does Default Limits
page The page to return. 1 Stop at the response’s pagesCount.
count Files per page. 10 At most 100; a larger value is rejected with 400 “Max page size is 100.”
Terminal window
curl "https://open-api.replyco.com/openapi/threadattachment/paged?count=100" \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"totalRecords": 1,
"pageSize": 100,
"pagesCount": 1,
"currentPage": 1,
"data": [
{
"id": "4e6a8c0e-2b4d-4f6a-9c1e-3a5b7c9d1e2f",
"name": "invoice-EX-100245.pdf",
"size": 48213,
"isOrderInvoice": true
}
]
}

Each operation whose path ends in /paged allows one user 15 calls a minute (see Rate limits). To read one file’s details, use GET /openapi/threadattachment/{id}.

Method Path Summary Scopes
GET /openapi/threadattachment/paged Get all records with paging —
GET /openapi/threadattachment/{id} Get element by id —
Status Meaning Returned by
401 Unauthorized GET /openapi/threadattachment/paged, GET /openapi/threadattachment/{id}