# Protect a staged file: writes its ledger record NOW and moves it into the document library `POST /agent/review/{id}/approve` **Required scope:** `documents:write` The proof therefore carries the approval date, not the date the agent uploaded it. If the record cannot be confirmed the file stays in the queue and this returns 502, because releasing it without a record would present an unprotected file as protected. ## Parameters | Name | In | Required | Description | |---|---|---|---| | `id` | path | yes | id of the target record | ## Request body Content type: `application/json` | Field | Type | Required | Description | |---|---|---|---| | `_` | string | no | No body. The file and its classification are already on immut; approving needs only the id in the path. | ## Responses | Status | Meaning | |---|---| | `200` | Success | | `400` | BadRequest | | `401` | Unauthorized | | `403` | Forbidden | | `429` | RateLimited | ## Example ```bash curl -X POST "https://backend.immut.io/api/v1/agent/review//approve" \ -H "Authorization: Bearer $IMMUT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"_":"<_>"}' ``` ## OpenAPI fragment ```json { "/agent/review/{id}/approve": { "post": { "operationId": "postagentreviewidapprove", "summary": "Protect a staged file: writes its ledger record NOW and moves it into the document library. The proof therefore carries the approval date, not the date the agent uploaded it. If the record cannot be confirmed the file stays in the queue and this returns 502, because releasing it without a record would present an unprotected file as protected.", "description": "Protect a staged file: writes its ledger record NOW and moves it into the document library. The proof therefore carries the approval date, not the date the agent uploaded it. If the record cannot be confirmed the file stays in the queue and this returns 502, because releasing it without a record would present an unprotected file as protected.", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "id of the target record" } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "_": { "type": "string", "description": "No body. The file and its classification are already on immut; approving needs only the id in the path." } } } } } }, "responses": { "200": { "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/RateLimited" } }, "tags": [ "Agent" ], "x-required-scope": "documents:write" } } } ```