Upload a file

View as MarkdownOpen in Claude
Stores one file for a few seconds ahead of a task write and returns the id to name in that task's `files`. There is no show route for an upload: it is either taken by a task write or removed automatically after one day, whichever comes first. Body (multipart/form-data): - `file` (required): at most 6 MB, one of `gif`, `jpeg`, `jpg`, `png`, `webp`, `tif`, `tiff`. Answers **201** with a `uploads` JSON:API document; its `id` is the uuid to send back in a task's `files.*.uuid`. No `Location` header - there is no show route for an upload. This endpoint requires its own `uploads.store` permission (the same three roles that hold `tasks.store`), and carries its own rate limit on top of the shared Public API one: **20 requests per minute per token**. - **422**: `file` missing, over 6 MB, or of a disallowed extension. - **403**: a read-only token. - **404**: the member lacks the `uploads.store` permission. - **429**: the 20-per-minute limit was reached.

Authentication

AuthorizationBearer

Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

Request

This endpoint expects a multipart form containing an optional file.
filefileOptional

Required. At most 6 MB. Allowed extensions: gif, jpeg, jpg, png, webp, tif, tiff.

Response

201 Created
dataobjectOptional
jsonapiobjectOptional