Skip to content
LogoLogo

Reserve a direct upload

Reserve a direct upload

POST/api/v1/attachment-uploads

Atomically reserves the declared byte count against the Workspace's pooled storage entitlement and returns a short-lived presigned URL bound to one method, one object key, and the reserved length. File bytes never pass through the Assign API.

The reservation expires if it is not completed. Expired, cancelled, and abandoned reservations release their quota.

Associating a completed attachment with a parent Task, comment, or Document is deliberately not part of this contract: attachment parent cardinality is an open decision and will be contracted with it rather than inferred from an implementation.

Header Parameters

X-CSRF-Token
string·min 1·max 200

Required when this operation uses browserSession; native bearer callers omit it because no ambient cookie is sent.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

Request Body

application/json
workspace_idRequired
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
filenameRequired
string·min 1·max 255

Display filename, at most 255 UTF-8 bytes after NFC normalization. It must not contain a path separator, null, or control character, must not be . or .., and must not begin or end with whitespace or a dot. A violating filename is rejected rather than rewritten. Filenames never contribute to the server-generated object key.

content_lengthRequired
integer·min 1·max 52428800

Exact byte count to reserve. The free tier allows 50 MiB per object.

content_type
string·max 255

Advisory only. The stored content type is detected from the object's leading bytes at completion and may differ.

sha256
string

Lowercase hexadecimal SHA-256 digest.

Responses