# Store a file on immut and create permanent proof `POST /documents` **Required scope:** `documents:write` Multipart field file (required) and workspace (required). Preferred path for the public agent skill. ## Request body Content type: `multipart/form-data` (required) | Field | Type | Required | Description | |---|---|---|---| | `file` | file | **yes** | multipart file field (required) | | `workspace` | string | **yes** | workspace id (required) | | `title` | string | no | optional | | `category` | string | no | optional | | `folder` | string | no | optional folder id | ## Responses | Status | Meaning | |---|---| | `201` | Created. data is the stored document, including its id. | | `400` | BadRequest | | `401` | Unauthorized | | `403` | Forbidden | | `429` | RateLimited | ## Example ```bash curl -X POST "https://backend.immut.io/api/v1/documents" \ -H "Authorization: Bearer $IMMUT_API_KEY" \ -F "file=@/path/to/file" \ -F "workspace=" \ -F "title=" \ -F "category=<category>" \ -F "folder=<folder>" ``` ## OpenAPI fragment ```json { "/documents": { "post": { "operationId": "postdocuments", "summary": "Store a file on immut and create permanent proof. Multipart field file (required) and workspace (required). Preferred path for the public agent skill.", "description": "Store a file on immut and create permanent proof. Multipart field file (required) and workspace (required). Preferred path for the public agent skill.", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "multipart file field (required)" }, "workspace": { "type": "string", "description": "workspace id (required)" }, "title": { "type": "string", "description": "optional" }, "category": { "type": "string", "description": "optional" }, "folder": { "type": "string", "description": "optional folder id" } }, "required": [ "file", "workspace" ] } } } }, "responses": { "201": { "description": "Created. data is the stored document, including its id." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/RateLimited" } }, "tags": [ "Documents" ], "x-required-scope": "documents:write" } } } ```