API reference
Files
Files attached to tasks. Endpoints, parameters, examples and errors.
On this page
Files attached to tasks. Send up to 8 MiB in one request with upload_attachment, or up to 100 MiB in parts with start_upload, upload_part and complete_upload. Downloads stream and take a Range. downloadUrl and previewUrl are signed links that work without an Authorization header for 10 minutes.
More in Files.
List a task’s attachments
#Lists the files attached to a task, oldest first.
GET /api/v1/tasks/{taskId}/attachments- Scopes:
files:read - Who: Viewer or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket
Returns the finished files of one task, oldest first, with signed links (downloadUrl, previewUrl) that work for 10 minutes. Unfinished uploads are not listed.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
taskId | path | id (task_…) | Yes | Task id: task_ followed by 32 lowercase hex digits, for example task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
limit | query | integer, 1–100 | No | How many to return, 1–100 (default 50). |
cursor | query | string | No | nextCursor from the previous page, to get the next one. Up to 2,048 characters. |
Response
#200 with a list of Attachment objects; while hasMore is true, pass nextCursor back as cursor (with the same filters) for the next page.
| Field | Type | Description |
|---|---|---|
object | "list" | |
hasMore | boolean | True when there is a next page. |
nextCursor | string or null | Pass it as cursor to read the next page; null on the last page. |
data | array of Attachment |
Headers it sends: Link.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_cursor | The cursor is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 404 | not_found | Not found |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments \
-H "Authorization: Bearer $TASKLOADER_API_KEY"const response = await fetch('https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const taskAttachments = await response.json();import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
task_attachments = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "list",
"data": [
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "launch-plan.pdf",
"size": 482133,
"mimeType": "application/pdf",
"kind": "file",
"status": "ready",
"width": null,
"height": null,
"durationSeconds": null,
"preview": {
"status": "none"
},
"createdBy": {
"userId": "usr_kq3Xb1W9pZ0aLm7c",
"name": "Maya Chen"
},
"createdAt": "2026-11-18T10:00:00.123Z",
"contentUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
"downloadUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content?exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"previewUrl": null,
"urlsExpireAt": "2026-11-18T10:10:00.000Z"
}
],
"hasMore": false,
"nextCursor": null
}List a project’s attachments
#Lists every file attached to tasks of a project, oldest first.
GET /api/v1/projects/{projectId}/attachments- Scopes:
files:read - Who: Viewer or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket
Returns the finished files of a project, oldest first, optionally only those of one task (taskId) or of one kind (kind: image, video or file). Each comes with signed links that work for 10 minutes. A task that is not in the project is a 400, never an ignored filter.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
projectId | path | id (prj_…) | Yes | Project id: prj_ followed by 32 lowercase hex digits, for example prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
taskId | query | id (task_…) | No | Only the files of this task (task_…), which must be in the project. |
kind | query | "image" or "video" or "file" | No | Only files of this kind: image, video or file. |
limit | query | integer, 1–100 | No | How many to return, 1–100 (default 50). |
cursor | query | string | No | nextCursor from the previous page, to get the next one. Up to 2,048 characters. |
Response
#200 with a list of Attachment objects; while hasMore is true, pass nextCursor back as cursor (with the same filters) for the next page.
| Field | Type | Description |
|---|---|---|
object | "list" | |
hasMore | boolean | True when there is a next page. |
nextCursor | string or null | Pass it as cursor to read the next page; null on the last page. |
data | array of Attachment |
Headers it sends: Link.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_cursor | The cursor is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 404 | not_found | Not found |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl 'https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments?kind=image' \
-H "Authorization: Bearer $TASKLOADER_API_KEY"const response = await fetch('https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments?kind=image', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const projectAttachments = await response.json();import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/projects/prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments",
params={"kind": "image"},
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
project_attachments = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "list",
"data": [
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "homepage-hero.png",
"size": 1838220,
"mimeType": "image/png",
"kind": "image",
"status": "ready",
"width": 2400,
"height": 1350,
"durationSeconds": null,
"preview": {
"status": "ready"
},
"createdBy": {
"userId": "usr_kq3Xb1W9pZ0aLm7c",
"name": "Maya Chen"
},
"createdAt": "2026-11-18T10:00:00.123Z",
"contentUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
"downloadUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content?disposition=inline&exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"previewUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview?exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"urlsExpireAt": "2026-11-18T10:10:00.000Z"
}
],
"hasMore": false,
"nextCursor": null
}Get an attachment
#Returns one attachment, with fresh signed links.
GET /api/v1/attachments/{attachmentId}- Scopes:
files:read - Who: Viewer or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket
Returns a finished attachment: its name, size, type, preview status and who attached it, with downloadUrl and previewUrl, signed links that work without an Authorization header for 10 minutes (urlsExpireAt). Read it again for fresh links; do not store them. contentUrl is the plain API address, for requests with your header.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentId | path | id (att_…) | Yes | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
Response
#200 with an Attachment object.
| Field | Type | Description |
|---|---|---|
object | "attachment" | |
id | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
taskId | id (task_…) | The task the file is attached to (task_…). |
projectId | id (prj_…) | The task’s project (prj_…). |
name | string | The file name as Taskloader keeps it (up to 255 characters): the name sent, with /, \, tabs, line breaks and other control characters replaced by _; zero-width spaces, byte-order marks and text-direction characters removed; and spaces at either end trimmed. |
size | integer | The file’s size in bytes. |
mimeType | string | The file’s type, one of the 19 accepted types, for example application/pdf. |
kind | string | How the file can be shown: image or video (they open in the app) or file (it only downloads). New kinds may be added; treat unknown ones as file. |
status | "ready" | Always ready: unfinished uploads are Upload objects, not attachments. |
width | integer or null | Images and videos: the width in pixels, when known; otherwise null. |
height | integer or null | Images and videos: the height in pixels, when known; otherwise null. |
durationSeconds | number or null | Videos: the length in seconds, when known; otherwise null. |
preview | object | The small preview image (a thumbnail, or a video’s poster frame). |
createdBy | object | Who attached the file. |
createdAt | string (date-time) | RFC 3339 UTC with milliseconds, for example 2026-11-18T10:00:00.123Z. |
contentUrl | string | The file’s API address (GET, with your Authorization header). It does not expire. |
downloadUrl | string | A signed link to the file that works without an Authorization header until urlsExpireAt; images and videos open in the browser. Never store it. |
previewUrl | string or null | A signed link to the preview image (WebP or JPEG); null when there is none. |
urlsExpireAt | string (date-time) or null | When downloadUrl and previewUrl stop working (10 minutes after this was read). Read the attachment again for fresh ones. |
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 403 | insufficient_scope | The credential lacks the required access |
| 404 | not_found | Not found |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
-H "Authorization: Bearer $TASKLOADER_API_KEY"const response = await fetch('https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const attachment = await response.json();import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
attachment = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "launch-plan.pdf",
"size": 482133,
"mimeType": "application/pdf",
"kind": "file",
"status": "ready",
"width": null,
"height": null,
"durationSeconds": null,
"preview": {
"status": "none"
},
"createdBy": {
"userId": "usr_kq3Xb1W9pZ0aLm7c",
"name": "Maya Chen"
},
"createdAt": "2026-11-18T10:00:00.123Z",
"contentUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
"downloadUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content?exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"previewUrl": null,
"urlsExpireAt": "2026-11-18T10:10:00.000Z"
}Download an attachment
#Streams a file’s bytes, whole or one byte range.
GET /api/v1/attachments/{attachmentId}/content- Scopes:
files:read, or a signed link from Taskloader (no Authorization header) - Who: Viewer or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket; through a signed link, thelinkbucket instead (600 a minute, bursts of up to 200, per credential and address)
Streams the file with Content-Length, a strong ETag (files never change) and Content-Disposition naming the file. It answers as application/octet-stream, so browsers save it; disposition=inline shows images and videos in the browser with their real type (other files still download). One byte range per request: Range: bytes=0-1048575 answers 206 with Content-Range; a range outside the file answers 416. Works with your Authorization header, or without one through a signed link from downloadUrl.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentId | path | id (att_…) | Yes | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
disposition | query | "attachment" or "inline" | No | attachment (the default) downloads; inline shows images and videos in the browser. |
exp | query | string | No | Part of a signed link (downloadUrl, previewUrl): when it expires. Never build it yourself. Up to 20 characters. |
cred | query | string | No | Part of a signed link: the credential it was issued to. Up to 200 characters. |
sig | query | string | No | Part of a signed link: its signature. Up to 100 characters. |
Range | header | string | No | One byte range, for example bytes=0-1048575, bytes=1048576- or bytes=-500. Up to 200 characters. |
If-None-Match | header | string | No | The file’s ETag from an earlier download, as "<attachment id>-<size>". Files never change, so when it matches the answer is 304 with no body. |
Response
#200: The file’s bytes: application/octet-stream with Content-Disposition: attachment, or, for an image or a video asked for with disposition=inline, its own type with inline. HEAD answers with the same headers and no body.
Media types: application/octet-stream, image/jpeg, image/png, image/webp, image/gif, image/avif, video/mp4, video/webm, video/quicktime.
Headers it sends: Content-Length, Content-Disposition, ETag, Accept-Ranges, Cache-Control.
Send the ETag back as If-None-Match to get 304 Not Modified instead of the bytes again.
206: Partial content: the one byte range asked for with Range, described by Content-Range.
304: Not modified: the ETag you sent in If-None-Match is still current. No body.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 403 | insufficient_scope | The credential lacks the required access |
| 404 | not_found | Not found |
| 416 | range_not_satisfiable | The range cannot be served |
| 429 | too_many_transfers | Too many file transfers at once |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-o download.binimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
await writeFile('download.bin', Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=120,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
with open("download.bin", "wb") as file:
file.write(response.content)HTTP/1.1 200 OK
Content-Type: application/octet-streamGet an attachment’s preview
#Streams the preview image of a file (WebP or JPEG).
GET /api/v1/attachments/{attachmentId}/preview- Scopes:
files:read, or a signed link from Taskloader (no Authorization header) - Who: Viewer or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket; through a signed link, thelinkbucket instead (600 a minute, bursts of up to 200, per credential and address)
Streams the small preview image of an attachment: a thumbnail of an image, or a video’s poster frame, as WebP or JPEG. Answers 404 when the file has no preview; its preview.status says whether one is coming. Works with your Authorization header, or without one through a signed link from previewUrl.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentId | path | id (att_…) | Yes | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
exp | query | string | No | Part of a signed link (downloadUrl, previewUrl): when it expires. Never build it yourself. Up to 20 characters. |
cred | query | string | No | Part of a signed link: the credential it was issued to. Up to 200 characters. |
sig | query | string | No | Part of a signed link: its signature. Up to 100 characters. |
Response
#200: The preview image, WebP or JPEG. Cached privately for an hour (not when read through a signed link).
Media types: image/webp, image/jpeg.
Headers it sends: Content-Length, Cache-Control.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 403 | insufficient_scope | The credential lacks the required access |
| 404 | not_found | Not found |
| 429 | too_many_transfers | Too many file transfers at once |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-o download.binimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
await writeFile('download.bin', Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=120,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
with open("download.bin", "wb") as file:
file.write(response.content)HTTP/1.1 200 OK
Content-Type: application/octet-streamUpload a preview
#Stores a preview image you made for an image or video you uploaded.
PUT /api/v1/attachments/{attachmentId}/preview- Scopes:
files:write - Who: The person who started the upload
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: naturally idempotent: repeating it changes nothing more
- Rate limit: the
writebucket
Stores your own preview of a file you uploaded: a WebP or JPEG image up to 1 MiB as the body, with its type as Content-Type and what you measured of the original (width, height in pixels and, for videos only, duration in seconds) in the query. Send it during the upload or after it. Only the person who uploaded the file can, while they can edit the task. Sending another replaces it, and it replaces a preview Taskloader made. Taskloader makes previews itself only for JPEG, PNG, WebP, GIF and AVIF images up to 25 MiB; HEIC and HEIF photos, larger images and videos have a preview only if you send one.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentId | path | id (att_…) | Yes | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
width | query | integer, 1–30,000 | No | The original’s width in pixels. |
height | query | integer, 1–30,000 | No | The original’s height in pixels. |
duration | query | number, 0–86,400 | No | Videos only: the length in seconds. Images answer invalid_preview. |
Content-Digest | header | string | No | The SHA-256 of the body, as sha-256=:<base64>: (RFC 9530). Optional: when sent, the bytes are checked against it before anything is stored (digest_mismatch). |
Request body
#The bytes themselves (not JSON), up to 8 MiB unless stated above, with their media type as Content-Type. Accepted types: image/webp, image/jpeg.
Response
#200 with an attachment_preview object.
| Field | Type | Description |
|---|---|---|
object | "attachment_preview" | |
attachmentId | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
width | integer or null | The width you sent, in pixels. |
height | integer or null | The height you sent, in pixels. |
durationSeconds | number or null | The length you sent, in seconds. |
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_preview | The preview is not accepted |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 400 | digest_mismatch | The part does not match its digest |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 413 | payload_too_large | The request body is too large |
| 413 | storage_quota_exceeded | Storage quota reached |
| 415 | unsupported_media_type | Unsupported media type |
| 429 | too_many_transfers | Too many file transfers at once |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl -X PUT 'https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview?width=1920&height=1080&duration=42.5' \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Content-Type: image/webp" \
--data-binary @file.binimport { readFile } from 'node:fs/promises';
const bytes = await readFile('file.bin');
const response = await fetch('https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview?width=1920&height=1080&duration=42.5', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Content-Type': 'image/webp',
},
body: bytes,
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const preview = await response.json();import os
import requests
with open("file.bin", "rb") as file:
data = file.read()
response = requests.put(
"https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/preview",
params={"width": "1920", "height": "1080", "duration": "42.5"},
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Content-Type": "image/webp",
},
data=data,
timeout=120,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
preview = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "attachment_preview",
"attachmentId": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"width": 1920,
"height": 1080,
"durationSeconds": 42.5
}Upload an attachment
#Attaches a file of up to 8 MiB to a task in one request.
POST /api/v1/tasks/{taskId}/attachments- Scopes:
files:write - Who: Editor or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: send
Idempotency-Keyto make retries safe - Rate limit: the
uploadbucket
Attaches a file to a task: the bytes are the request body (up to 8 MiB), Content-Type is the file’s type (one of the 19 accepted types), and the name comes from ?name= or Content-Disposition: attachment; filename*=UTF-8''…. Taskloader checks the first bytes against the type (file_type_mismatch otherwise) and stores the file exactly as sent; photos keep their metadata. Answers 201 with the attachment. For larger files, or to resume after a broken connection, use start_upload. With an Idempotency-Key, also send Content-Digest: sha-256=:<base64>:.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
taskId | path | id (task_…) | Yes | Task id: task_ followed by 32 lowercase hex digits, for example task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
name | query | string | No | The file name, for example launch-plan.pdf (or send Content-Disposition). Up to 255 characters. |
Content-Disposition | header | string | No | attachment; filename*=UTF-8''<percent-encoded name>, for names with any characters. Up to 4,096 characters. |
Idempotency-Key | header | string | No | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with Idempotent-Replayed: true) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |
Content-Digest | header | string | No | The SHA-256 of the body, as sha-256=:<base64>: (RFC 9530). Checked against the bytes received; required together with Idempotency-Key, so a retry with other bytes is told apart. |
Request body
#The bytes themselves (not JSON), up to 8 MiB unless stated above, with their media type as Content-Type. Accepted types: image/jpeg, image/png, image/webp, image/gif, image/avif, image/heic, image/heif, video/mp4, video/webm, video/quicktime, application/pdf, text/plain, text/markdown, text/csv, application/json, application/zip, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation. Name the file with Content-Disposition.
Response
#201 with the new Attachment object. Location is its address.
| Field | Type | Description |
|---|---|---|
object | "attachment" | |
id | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
taskId | id (task_…) | The task the file is attached to (task_…). |
projectId | id (prj_…) | The task’s project (prj_…). |
name | string | The file name as Taskloader keeps it (up to 255 characters): the name sent, with /, \, tabs, line breaks and other control characters replaced by _; zero-width spaces, byte-order marks and text-direction characters removed; and spaces at either end trimmed. |
size | integer | The file’s size in bytes. |
mimeType | string | The file’s type, one of the 19 accepted types, for example application/pdf. |
kind | string | How the file can be shown: image or video (they open in the app) or file (it only downloads). New kinds may be added; treat unknown ones as file. |
status | "ready" | Always ready: unfinished uploads are Upload objects, not attachments. |
width | integer or null | Images and videos: the width in pixels, when known; otherwise null. |
height | integer or null | Images and videos: the height in pixels, when known; otherwise null. |
durationSeconds | number or null | Videos: the length in seconds, when known; otherwise null. |
preview | object | The small preview image (a thumbnail, or a video’s poster frame). |
createdBy | object | Who attached the file. |
createdAt | string (date-time) | RFC 3339 UTC with milliseconds, for example 2026-11-18T10:00:00.123Z. |
contentUrl | string | The file’s API address (GET, with your Authorization header). It does not expire. |
downloadUrl | string | A signed link to the file that works without an Authorization header until urlsExpireAt; images and videos open in the browser. Never store it. |
previewUrl | string or null | A signed link to the preview image (WebP or JPEG); null when there is none. |
urlsExpireAt | string (date-time) or null | When downloadUrl and previewUrl stop working (10 minutes after this was read). Read the attachment again for fresh ones. |
Headers it sends: Location, Idempotent-Replayed.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 400 | digest_mismatch | The part does not match its digest |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 409 | idempotency_key_in_progress | The original request is still running |
| 413 | payload_too_large | The request body is too large |
| 413 | file_too_large | The file is too large |
| 413 | storage_quota_exceeded | Storage quota reached |
| 415 | unsupported_media_type | Unsupported media type |
| 415 | unsupported_file_type | This file type is not accepted |
| 422 | file_type_mismatch | The file is not of its declared type |
| 422 | idempotency_key_reused | The Idempotency-Key was used for another request |
| 429 | too_many_open_uploads | Too many unfinished uploads |
| 429 | too_many_transfers | Too many file transfers at once |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl 'https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments?name=launch-plan.pdf' \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Content-Type: application/pdf" \
-H "Content-Digest: sha-256=:$(openssl dgst -sha256 -binary launch-plan.pdf | base64):" \
-H "Idempotency-Key: $(uuidgen)" \
--data-binary @launch-plan.pdfimport { readFile } from 'node:fs/promises';
import { createHash } from 'node:crypto';
const bytes = await readFile('launch-plan.pdf');
const digest = createHash('sha256').update(bytes).digest('base64');
const response = await fetch('https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments?name=launch-plan.pdf', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Content-Type': 'application/pdf',
'Content-Digest': `sha-256=:${digest}:`,
'Idempotency-Key': crypto.randomUUID(),
},
body: bytes,
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const attachment = await response.json();import base64
import hashlib
import os
import uuid
import requests
with open("launch-plan.pdf", "rb") as file:
data = file.read()
digest = base64.b64encode(hashlib.sha256(data).digest()).decode()
response = requests.post(
"https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/attachments",
params={"name": "launch-plan.pdf"},
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Content-Type": "application/pdf",
"Content-Digest": f"sha-256=:{digest}:",
"Idempotency-Key": str(uuid.uuid4()),
},
data=data,
timeout=120,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
attachment = response.json()HTTP/1.1 201 Created
Content-Type: application/json
Location: /api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "launch-plan.pdf",
"size": 482133,
"mimeType": "application/pdf",
"kind": "file",
"status": "ready",
"width": null,
"height": null,
"durationSeconds": null,
"preview": {
"status": "none"
},
"createdBy": {
"userId": "usr_kq3Xb1W9pZ0aLm7c",
"name": "Maya Chen"
},
"createdAt": "2026-11-18T10:00:00.123Z",
"contentUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
"downloadUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content?exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"previewUrl": null,
"urlsExpireAt": "2026-11-18T10:10:00.000Z"
}Start an upload
#Opens a resumable upload of a file of up to 100 MiB, sent in parts.
POST /api/v1/tasks/{taskId}/uploads- Scopes:
files:write - Who: Editor or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: send
Idempotency-Keyto make retries safe - Rate limit: the
writebucket
Opens an upload for a file of up to 100 MiB (104,857,600 bytes). The answer lists every part with its exact size and an uploadUrl: PUT each part there (any order, in parallel), then complete_upload. Part n is bytes (n − 1) × partSize to n × partSize − 1 of the file. An upload is canceled when no part arrives for an hour, and 24 hours after it started at the latest (expiresAt); get_upload says which parts arrived, so you can resume. You can have 12 unfinished uploads at a time.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
taskId | path | id (task_…) | Yes | Task id: task_ followed by 32 lowercase hex digits, for example task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
Idempotency-Key | header | string | No | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with Idempotent-Replayed: true) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |
Request body
#A JSON object. Fields not listed are refused.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The file name, for example product-demo.mp4. Up to 255 characters. |
size | integer, at least 1 | Yes | The whole file’s size in bytes, at most 104,857,600 (100 MiB). |
type | "image/jpeg" or "image/png" or "image/webp" or "image/gif" or "image/avif" or "image/heic" or "image/heif" or "video/mp4" or "video/webm" or "video/quicktime" or "application/pdf" or "text/plain" or "text/markdown" or "text/csv" or "application/json" or "application/zip" or "application/vnd.openxmlformats-officedocument.wordprocessingml.document" or "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" or "application/vnd.openxmlformats-officedocument.presentationml.presentation" | Yes | The file’s type, one of the 19 accepted types, for example video/mp4. Up to 255 characters. |
Response
#201 with the new Upload object. Location is its address.
| Field | Type | Description |
|---|---|---|
object | "upload" | |
id | id (att_…) | The upload’s id (att_…); once completed, the attachment has the same id. |
taskId | id (task_…) | Task id: task_ followed by 32 lowercase hex digits, for example task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
name | string | The file name as Taskloader keeps it (up to 255 characters): the name sent, with /, \, tabs, line breaks and other control characters replaced by _; zero-width spaces, byte-order marks and text-direction characters removed; and spaces at either end trimmed. |
size | integer | The whole file’s size in bytes. |
mimeType | string | The file’s type. |
partSize | integer | Bytes in every part but the last: part n starts at (n − 1) × partSize. |
partCount | integer | How many parts the file is sent in. |
parts | array of object | Every part to send, in order. They can be sent in any order, and in parallel. |
receivedParts | array of integer | The part numbers storage already holds; send only the others. |
status | "uploading" | |
expiresAt | string (date-time) | When the upload is canceled unless a part arrives first: an hour after its last part arrived (or it started), and 24 hours after it started at the latest. Each part moves it on. |
Headers it sends: Location, Idempotent-Replayed.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 409 | idempotency_key_in_progress | The original request is still running |
| 413 | payload_too_large | The request body is too large |
| 413 | file_too_large | The file is too large |
| 413 | storage_quota_exceeded | Storage quota reached |
| 415 | unsupported_media_type | Unsupported media type |
| 415 | unsupported_file_type | This file type is not accepted |
| 422 | idempotency_key_reused | The Idempotency-Key was used for another request |
| 429 | too_many_open_uploads | Too many unfinished uploads |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/uploads \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"product-demo.mp4","size":20971520,"type":"video/mp4"}'const response = await fetch('https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/uploads', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({ name: 'product-demo.mp4', size: 20971520, type: 'video/mp4' }),
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const upload = await response.json();import os
import uuid
import requests
response = requests.post(
"https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/uploads",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Content-Type": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
},
json={"name": "product-demo.mp4", "size": 20971520, "type": "video/mp4"},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
upload = response.json()HTTP/1.1 201 Created
Content-Type: application/json
Location: /api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718
{
"object": "upload",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "product-demo.mp4",
"size": 20971520,
"mimeType": "video/mp4",
"partSize": 8388608,
"partCount": 3,
"parts": [
{
"partNumber": 1,
"size": 8388608,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/1"
},
{
"partNumber": 2,
"size": 8388608,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/2"
},
{
"partNumber": 3,
"size": 4194304,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/3"
}
],
"receivedParts": [],
"status": "uploading",
"expiresAt": "2026-11-18T11:00:00.123Z"
}Get an upload
#Returns an unfinished upload and the parts that already arrived.
GET /api/v1/uploads/{uploadId}- Scopes:
files:write - Who: The person who started the upload
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: a read; safe to repeat
- Rate limit: the
readbucket
Returns an unfinished upload as start_upload did, with receivedParts: every part storage accepted (each upload_part that answered 200, plus any part storage holds that Taskloader has no record of). After a restart, send only the parts not listed, then complete_upload. Only the person who started the upload can read it, while they can edit the task. Once the upload is complete, get_upload answers 404 saying so; complete_upload is safe to repeat and returns the attachment. An upload no part reached for an hour, or started 24 hours ago, was canceled: every request about it answers 404 saying so, and the file needs a new upload.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
uploadId | path | id (att_…) | Yes | The upload’s id (att_…), as start_upload returned it. |
Response
#200 with an Upload object.
| Field | Type | Description |
|---|---|---|
object | "upload" | |
id | id (att_…) | The upload’s id (att_…); once completed, the attachment has the same id. |
taskId | id (task_…) | Task id: task_ followed by 32 lowercase hex digits, for example task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
name | string | The file name as Taskloader keeps it (up to 255 characters): the name sent, with /, \, tabs, line breaks and other control characters replaced by _; zero-width spaces, byte-order marks and text-direction characters removed; and spaces at either end trimmed. |
size | integer | The whole file’s size in bytes. |
mimeType | string | The file’s type. |
partSize | integer | Bytes in every part but the last: part n starts at (n − 1) × partSize. |
partCount | integer | How many parts the file is sent in. |
parts | array of object | Every part to send, in order. They can be sent in any order, and in parallel. |
receivedParts | array of integer | The part numbers storage already holds; send only the others. |
status | "uploading" | |
expiresAt | string (date-time) | When the upload is canceled unless a part arrives first: an hour after its last part arrived (or it started), and 24 hours after it started at the latest. Each part moves it on. |
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
-H "Authorization: Bearer $TASKLOADER_API_KEY"const response = await fetch('https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const upload = await response.json();import os
import requests
response = requests.get(
"https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
upload = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "upload",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "product-demo.mp4",
"size": 20971520,
"mimeType": "video/mp4",
"partSize": 8388608,
"partCount": 3,
"parts": [
{
"partNumber": 1,
"size": 8388608,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/1"
},
{
"partNumber": 2,
"size": 8388608,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/2"
},
{
"partNumber": 3,
"size": 4194304,
"uploadUrl": "/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/3"
}
],
"receivedParts": [
1
],
"status": "uploading",
"expiresAt": "2026-11-18T11:00:00.123Z"
}Upload a part
#Stores one part of an upload; sending a part again replaces it.
PUT /api/v1/uploads/{uploadId}/parts/{partNumber}- Scopes:
files:write - Who: The person who started the upload
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: naturally idempotent: repeating it changes nothing more
- Rate limit: the
uploadbucket
Stores part partNumber of an upload: the body is exactly that part’s bytes (parts[n].size; part_length_mismatch otherwise). Parts can be sent in any order and in parallel, and sending one again replaces it. An optional Content-Digest: sha-256=:<base64>: is checked before the part is stored. Part 1 is checked against the file’s type; a mismatch cancels the upload (file_type_mismatch).
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
uploadId | path | id (att_…) | Yes | The upload’s id (att_…), as start_upload returned it. |
partNumber | path | integer | Yes | From 1 to the upload’s partCount. |
Content-Digest | header | string | No | The SHA-256 of the body, as sha-256=:<base64>: (RFC 9530). Optional: when sent, the bytes are checked against it before anything is stored (digest_mismatch). |
Request body
#The bytes themselves (not JSON), up to 8 MiB unless stated above, with their media type as Content-Type.
Response
#200 with an upload_part object.
| Field | Type | Description |
|---|---|---|
object | "upload_part" | |
partNumber | integer | |
size | integer | Bytes stored for this part. |
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | part_out_of_range | The part number is out of range |
| 400 | part_length_mismatch | The part has the wrong size |
| 400 | digest_mismatch | The part does not match its digest |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 413 | payload_too_large | The request body is too large |
| 415 | unsupported_media_type | Unsupported media type |
| 422 | file_type_mismatch | The file is not of its declared type |
| 429 | too_many_transfers | Too many file transfers at once |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl -X PUT https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/2 \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @file.binimport { readFile } from 'node:fs/promises';
const bytes = await readFile('file.bin');
const response = await fetch('https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/2', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Content-Type': 'application/octet-stream',
},
body: bytes,
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const part = await response.json();import os
import requests
with open("file.bin", "rb") as file:
data = file.read()
response = requests.put(
"https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/parts/2",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Content-Type": "application/octet-stream",
},
data=data,
timeout=120,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
part = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "upload_part",
"partNumber": 2,
"size": 8388608
}Complete an upload
#Joins an upload’s parts into the attachment; safe to repeat.
POST /api/v1/uploads/{uploadId}/complete- Scopes:
files:write - Who: The person who started the upload
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: naturally idempotent: repeating it changes nothing more
- Rate limit: the
writebucket
Joins the parts once every one has arrived and attaches the file to its task. Call it as soon as the last upload_part answered 200: every part that answered 200 is joined. Answers with the attachment, also when the upload was already completed (or is being completed by another request at the same time): the file is attached once. Before every part arrived it answers 409 upload_incomplete at once with missingParts and receivedParts: send the missing parts, then complete again. A 503 storage_unavailable is temporary: wait Retry-After seconds and complete again.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
uploadId | path | id (att_…) | Yes | The upload’s id (att_…), as start_upload returned it. |
Response
#200 with an Attachment object.
| Field | Type | Description |
|---|---|---|
object | "attachment" | |
id | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
taskId | id (task_…) | The task the file is attached to (task_…). |
projectId | id (prj_…) | The task’s project (prj_…). |
name | string | The file name as Taskloader keeps it (up to 255 characters): the name sent, with /, \, tabs, line breaks and other control characters replaced by _; zero-width spaces, byte-order marks and text-direction characters removed; and spaces at either end trimmed. |
size | integer | The file’s size in bytes. |
mimeType | string | The file’s type, one of the 19 accepted types, for example application/pdf. |
kind | string | How the file can be shown: image or video (they open in the app) or file (it only downloads). New kinds may be added; treat unknown ones as file. |
status | "ready" | Always ready: unfinished uploads are Upload objects, not attachments. |
width | integer or null | Images and videos: the width in pixels, when known; otherwise null. |
height | integer or null | Images and videos: the height in pixels, when known; otherwise null. |
durationSeconds | number or null | Videos: the length in seconds, when known; otherwise null. |
preview | object | The small preview image (a thumbnail, or a video’s poster frame). |
createdBy | object | Who attached the file. |
createdAt | string (date-time) | RFC 3339 UTC with milliseconds, for example 2026-11-18T10:00:00.123Z. |
contentUrl | string | The file’s API address (GET, with your Authorization header). It does not expire. |
downloadUrl | string | A signed link to the file that works without an Authorization header until urlsExpireAt; images and videos open in the browser. Never store it. |
previewUrl | string or null | A signed link to the preview image (WebP or JPEG); null when there is none. |
urlsExpireAt | string (date-time) or null | When downloadUrl and previewUrl stop working (10 minutes after this was read). Read the attachment again for fresh ones. |
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 409 | upload_incomplete | The upload is missing parts |
| 413 | payload_too_large | The request body is too large |
| 415 | unsupported_media_type | Unsupported media type |
| 503 | storage_unavailable | File storage is unavailable |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl -X POST https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/complete \
-H "Authorization: Bearer $TASKLOADER_API_KEY"const response = await fetch('https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/complete', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const upload = await response.json();import os
import requests
response = requests.post(
"https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/complete",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
upload = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"taskId": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "product-demo.mp4",
"size": 20971520,
"mimeType": "video/mp4",
"kind": "video",
"status": "ready",
"width": null,
"height": null,
"durationSeconds": null,
"preview": {
"status": "none"
},
"createdBy": {
"userId": "usr_kq3Xb1W9pZ0aLm7c",
"name": "Maya Chen"
},
"createdAt": "2026-11-18T10:00:00.123Z",
"contentUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content",
"downloadUrl": "https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/content?disposition=inline&exp=1794996600&cred=key_0b6f1d2a8c9e4f00a1b2c3d4e5f60718&sig=Xq3…",
"previewUrl": null,
"urlsExpireAt": "2026-11-18T10:10:00.000Z"
}Cancel an upload
#Cancels an unfinished upload and frees what storage holds for it.
DELETE /api/v1/uploads/{uploadId}- Scopes:
files:write - Who: The person who started the upload
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: send
Idempotency-Keyto make retries safe - Rate limit: the
writebucket
Cancels an unfinished upload; the parts already stored are removed in the background, and then the upload is not found. To retry a cancel safely, send an Idempotency-Key: the same key gets the first answer for 24 hours. Only the person who started the upload can cancel it. A completed upload is an attachment: delete it with delete_attachment instead.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
uploadId | path | id (att_…) | Yes | The upload’s id (att_…), as start_upload returned it. |
Idempotency-Key | header | string | No | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with Idempotent-Replayed: true) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |
Response
#200 with an upload object.
| Field | Type | Description |
|---|---|---|
object | "upload" | |
id | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
canceled | true |
Headers it sends: Idempotent-Replayed.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 409 | idempotency_key_in_progress | The original request is still running |
| 413 | payload_too_large | The request body is too large |
| 415 | unsupported_media_type | Unsupported media type |
| 422 | idempotency_key_reused | The Idempotency-Key was used for another request |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl -X DELETE https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch('https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const upload = await response.json();import os
import uuid
import requests
response = requests.delete(
"https://taskloader.com/api/v1/uploads/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
upload = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "upload",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"canceled": true
}Delete an attachment
#Deletes a file from its task.
DELETE /api/v1/attachments/{attachmentId}- Scopes:
files:write - Who: Editor or above in the project
- Project-limited credentials: allowed inside the credential’s projects; anything else is
not_found - Retries: send
Idempotency-Keyto make retries safe - Rate limit: the
writebucket - MCP tool:
delete_attachment
Deletes a finished attachment: it disappears for everyone at once and its storage is freed in the background. It cannot be restored. The task’s history records who removed it. To retry a delete safely, send an Idempotency-Key: the same key gets the first answer for 24 hours, while a retry without one answers 404 once the delete went through. To stop an unfinished upload, use cancel_upload.
Parameters
#| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentId | path | id (att_…) | Yes | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
Idempotency-Key | header | string | No | Makes a retry safe: the same key with the same request within 24 hours returns the first answer (with Idempotent-Replayed: true) instead of acting twice. 1 to 255 printable ASCII characters; a UUID works well. Keys belong to the credential that sent them. |
Response
#200 with an attachment object.
| Field | Type | Description |
|---|---|---|
object | "attachment" | |
id | id (att_…) | Attachment id: att_ followed by 32 lowercase hex digits, for example att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718. |
name | string | The name of the file that was deleted. |
deleted | true |
Headers it sends: Idempotent-Replayed.
Errors
#| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_id | The id is for a different kind of resource |
| 400 | invalid_idempotency_key | The Idempotency-Key header is not valid |
| 403 | insufficient_scope | The credential lacks the required access |
| 403 | forbidden_role | Your role does not allow this |
| 404 | not_found | Not found |
| 409 | idempotency_key_in_progress | The original request is still running |
| 413 | payload_too_large | The request body is too large |
| 415 | unsupported_media_type | Unsupported media type |
| 422 | idempotency_key_reused | The Idempotency-Key was used for another request |
And the errors every operation can return: invalid_request, validation_failed, token_in_url, unauthenticated, invalid_token, rate_limited, internal_error, service_unavailable.
Example
#curl -X DELETE https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch('https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
if (!response.ok) {
const problem = await response.json();
throw new Error(`${problem.code}: ${problem.detail}`);
}
const attachment = await response.json();import os
import uuid
import requests
response = requests.delete(
"https://taskloader.com/api/v1/attachments/att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
if not response.ok:
problem = response.json()
raise RuntimeError(f"{problem['code']}: {problem['detail']}")
attachment = response.json()HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "attachment",
"id": "att_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"name": "launch-plan.pdf",
"deleted": true
}