Get a presigned URL to upload a task attachment
curl --request POST \ --url https://example.com/api/v1/uploads/url \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contentType": "example", "fileName": "example", "purpose": "task", "size": 1 }'For a client that can run an HTTP PUT itself: the file never passes through this API. Takes fileName, contentType (the type derived from the file name) and the exact size (at most 25 MB), and refuses what POST /uploads/file refuses (empty, over 25 MB, executables by extension) before signing anything. Returns a short-lived uploadUrl that signs the content type and the length: PUT the bytes to it with the headers given. The object waits under the caller’s own pending prefix; pass the returned url as fileUrl to POST /tasks/{id}/attachments, which reads the stored object back, refuses (and deletes) one whose size is not the declared size, an executable, or an image or PDF whose bytes are not its type, and only the member who asked for the URL can attach it. A pending upload nobody attaches is deleted after 24 hours. MCP: create-upload-url.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
MIME type the file will be sent with. It must equal the type the server derives from the file name (the response’s mimeType); a different value is refused with the expected one
Original file name including its extension
“task” (default): a task attachment. A deal’s file goes through upload-file with purpose “deal”
Exact size of the file in bytes; at most 25 MB. The upload must be this long
Responses
Section titled “Responses”Upload URL issued.
object
A presigned upload URL and the reference that attaches the uploaded file to a task.
object
ISO 8601 instant after which uploadUrl stops working.
File name as given.
Declared size in bytes.
Alias of url accepted directly by POST /tasks/{id}/attachments.
The header the upload must carry, byte for byte; the URL signs it and the length.
object
Server-derived MIME type, the value of headers.Content-Type.
Short-lived presigned URL. Send the file to it with an HTTP PUT, for example curl -T <file> -H "Content-Type: <headers.Content-Type>" "<uploadUrl>".
Reference to pass as fileUrl to POST /tasks/{id}/attachments once the upload is done. Only the member who asked for it can use it, and only until the pending upload is swept (24 hours).
Example
{ "data": { "method": "PUT" }}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" }}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