Attachments API
Attachments are files or links on a task or one of its comments.
Implementation notes
Attachments (OpenSpec attachments) are files or links on a task or one of its comments. Their metadata is an entity in the operation log (attachment, fields in docs/sync.md); the bytes are files moved with these routes. Every route answers 404 not_found for an attachment or task you cannot read. Uploads need a session or a full token (read tokens get 403) and are limited to 120 per hour per account (429 rate_limited).
- PATCH
/api/v1/attachments/{id} - DELETE
/api/v1/attachments/{id} - GET
/api/v1/attachments/{id}/content - PUT
/api/v1/attachments/{id}/content - GET
/api/v1/notes/{id}/attachments - POST
/api/v1/notes/{id}/attachments - GET
/api/v1/settings/attachments - PUT
/api/v1/settings/attachments - GET
/api/v1/tasks/{id}/attachments - POST
/api/v1/tasks/{id}/attachments
PATCH /api/v1/attachments/{id}
Update a attachment · Token or session
{"name": "…"}: rename (author only)
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
name | string | null |
| Field | Type | Description |
|---|---|---|
uploaded | boolean |
DELETE /api/v1/attachments/{id}
Delete a attachment · Token or session
Remove (author, project admin or owner); 204
| Field | Type | Description |
|---|---|---|
id required | string | path |
GET /api/v1/attachments/{id}/content
Get attachment content · Token or session
The file, with ranges and If-None-Match. ?download=1 forces a download
| Field | Type | Description |
|---|---|---|
id required | string | path |
PUT /api/v1/attachments/{id}/content
Update attachment content · Token or session
The raw bytes of an attachment you created (from a device that queued it offline); 204. The bytes must match the attachment's size and sha256
| Field | Type | Description |
|---|---|---|
id required | string | path |
GET /api/v1/notes/{id}/attachments
List note attachments · Token or session
The same for a standalone note: its attachments carry note_id instead of task_id (no comment_id). A note's copy (moved to another project, or turned into a task) names the original's stored file in file_id and serves its bytes
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
attachments required | array of object |
POST /api/v1/notes/{id}/attachments
Create a note attachment · Token or session
The same for a standalone note: its attachments carry note_id instead of task_id (no comment_id). A note's copy (moved to another project, or turned into a task) names the original's stored file in file_id and serves its bytes
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
name required | string | |
url required | string |
| Field | Type | Description |
|---|---|---|
uploaded | boolean |
| Field | Type | Description |
|---|---|---|
uploaded | boolean |
GET /api/v1/settings/attachments
List settings attachments · Token or session
{enabled, max_file_mb, quota_mb}; changing them is for the owner (max_file_mb 1–2048, quota_mb 0 = unlimited). Changes are audited as settings.changed
| Field | Type | Description |
|---|---|---|
enabled required | boolean | |
max_file_mb required | number | |
quota_mb required | number |
PUT /api/v1/settings/attachments
Update settings attachments · Token or session
{enabled, max_file_mb, quota_mb}; changing them is for the owner (max_file_mb 1–2048, quota_mb 0 = unlimited). Changes are audited as settings.changed
Only the server's owner.
| Field | Type | Description |
|---|---|---|
enabled required | boolean | |
max_file_mb required | number | |
quota_mb required | number |
| Field | Type | Description |
|---|---|---|
enabled required | boolean | |
max_file_mb required | number | |
quota_mb required | number |
GET /api/v1/tasks/{id}/attachments
List task attachments · Token or session
The task's attachments that are not removed, oldest first, each with uploaded
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
attachments required | array of object |
POST /api/v1/tasks/{id}/attachments
Create a task attachment · Token or session
Multipart file (and optional comment_id): stores the file and creates the attachment in one request. JSON {"url": "https://…", "name"?: "…"}: a link attachment. 201 with the attachment. Honours Idempotency-Key (a retry answers 200 with Idempotent-Replayed: true)
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
name required | string | |
url required | string |
| Field | Type | Description |
|---|---|---|
uploaded | boolean |
| Field | Type | Description |
|---|---|---|
uploaded | boolean |