Upload a file to attach to a task or a deal
curl --request POST \ --url https://example.com/api/v1/uploads/file \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form purpose=taskAccepts one multipart attachment up to 25 MB in the authenticated workspace. Executables (.exe, .msi, .sh, .bat, .jar, …) are refused by extension. HTML, HTM, SVG, JS, MJS and TS are allowed and served as attachment downloads with application/octet-stream and X-Content-Type-Options: nosniff. MIME is derived from the filename, ignoring the client hint. Returns url and its fileUrl alias with fileName, fileSize and mimeType; pass the returned data object unchanged to POST /tasks/{id}/attachments. With purpose=deal the file must be a type a deal accepts, is stored apart from task attachments, and is attached with POST /deals/{id}/attachments by the same member; it requires the Sales module and deals.manage (404 MODULE_DISABLED or 403 otherwise). MCP upload-file accepts the equivalent fileName and fileBase64 (25 MB decoded), then add-task-attachment accepts url, name, fileSize and mimeType. The same storage validation and workspace quota apply to both interfaces. REST uploads have a separate workspace/user quota bucket using the configured write limit (default 60 requests per minute). A 429 returns Retry-After and RateLimit headers.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Any attachment up to 25 MB. HTML, SVG and source code are served as inert downloads. Executable types (.exe, .sh, .bat, …) are refused by extension. MIME is determined by the server.
“task” (default) for a task, ticket or project attachment; “deal” for a file to attach to a deal with POST /deals/{id}/attachments, which must be PDF or DOCX.
Responses
Section titled “Responses”File stored.
object
Reference and metadata of an uploaded file, ready to attach to a task.
object
Original file name, as uploaded.
File size in bytes.
Alias of url accepted directly by POST /tasks/{id}/attachments.
Server-derived MIME type from the file extension; source and markup use application/octet-stream.
Relative /api/v1/files/... URL of the stored file. Pass it as fileUrl to POST /tasks/{id}/attachments.
Example generated
{ "data": { "fileName": "example", "fileSize": 1, "fileUrl": "example", "mimeType": "example", "url": "example" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}purpose=deal and the Sales module is turned off (MODULE_DISABLED).
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Workspace storage quota exceeded.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC