Attachment
An attachment is a file that belongs to a thread — uploaded first, then referenced when a message is posted. Uploads and messages are separate steps so that a file can be transferred while a message is still being written.
An attachment that is uploaded while composing carries composing: true and belongs to no message yet; posting a message with its id is what binds the two together.
Returns the attachments of a thread. threadId is required — attachments are never listed across threads.
Filterable — id, threadId, messageId, creatorId, name, contentType, size, inline, composing, createdAt.
Sortable — id, name, size, createdAt.
Searchable — nothing yet; use filter with contains on name.
Token issued by the central equipme authentication, sent as Bearer <token>.
Thread id
8801JSON filter expression
Free-text term — no effect here
Comma-separated field:direction terms
Selection of fields and relations
name,size,contentTypeNumber of entries to skip
0Page size, 1 to 100
100OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
GET /api/v1/attachments?threadId=1 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"data": [
{
"composing": true,
"contentId": "text",
"contentType": "text",
"createdAt": "text",
"creator": {
"assignmentContext": "text",
"autoAssign": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"description": "text",
"email": "ada.lovelace@example.com",
"firstName": "Ada",
"id": 17,
"kind": "",
"lastName": "Lovelace",
"mobile": "text",
"phone": "text",
"tenant": {
"id": 1,
"name": "text"
},
"tenantId": 1,
"title": "text",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"creatorId": 1,
"id": 1,
"inline": true,
"link": "text",
"messageId": 1,
"name": "text",
"size": 1,
"threadId": 1
}
]
}Uploads one or more files as multipart/form-data under the field name files.
Either threadId names the thread the files belong to, or composing=true marks them as not yet bound to a thread — in that case tenantId says where they live. Without one of the two the request is answered with 400.
Because several files travel in one request, the answer distinguishes three outcomes:
201
every file was stored; data holds them
207
some were stored, some were not; errors names the failures per file
422
none could be stored
An entry in errors carries the filename and what went wrong, so a client can retry exactly those.
Token issued by the central equipme authentication, sent as Bearer <token>.
8801Created
Some files were stored, some were not
Bad Request
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/v1/attachments HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
{
"data": [
{
"composing": true,
"contentId": "text",
"contentType": "text",
"createdAt": "text",
"creator": {
"assignmentContext": "text",
"autoAssign": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"description": "text",
"email": "ada.lovelace@example.com",
"firstName": "Ada",
"id": 17,
"kind": "",
"lastName": "Lovelace",
"mobile": "text",
"phone": "text",
"tenant": {
"id": 1,
"name": "text"
},
"tenantId": 1,
"title": "text",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"creatorId": 1,
"id": 1,
"inline": true,
"link": "text",
"messageId": 1,
"name": "text",
"size": 1,
"threadId": 1
}
],
"errors": [
{
"error": "text",
"filename": "text"
}
]
}Deletes an attachment and its stored file. A file that a message already refers to disappears from that message. Answers with 204 and no body.
Token issued by the central equipme authentication, sent as Bearer <token>.
Attachment id
4501No Content
No content
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
DELETE /api/v1/attachments/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Streams the file. The response is the file itself, not JSON — Content-Type is what the attachment was stored as, and Content-Disposition carries its name.
The same file is also served under /v1/attachments/{id}/download/{filename}, where the trailing segment is cosmetic: it lets a browser save the file under a readable name without a further round trip. Any name works, the file is chosen by its id. Attachment bodies are never cached by intermediaries.
Token issued by the central equipme authentication, sent as Bearer <token>.
Attachment id
4501Name to save the file under
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
GET /api/v1/attachments/{id}/download HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?