{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-document-update-request-schema.json",
  "title": "DocumentUpdateRequest",
  "description": "Move a document between folders. That is the whole of it.\n\nThe web app's `PATCH /documents/{id}` also accepts `filename`, `matterId`\nand `metadata`, and none of the three can be published here.\n\n`filename` and `matterId` are both INSIDE the R2 object key.\n`r2_storage._generate_file_key` composes\n`orgs/{org}/matters/{matter}/docs/{doc}/{filename}`, and both\n`r2_storage.download_document` and `adapters/document_content._object_key`\nREGENERATE that key from the row rather than reading a stored path. So\nchanging either one makes the original permanently unreadable, with no error\nat write time and no error until somebody asks for the file. The web app has\nthat defect today; publishing the fields here would inherit it, and a moved\ndocument is a copy-then-delete job rather than a PATCH.\n\n`metadata` is free-form JSONB whose keys the ingest pipeline owns:\n`{\"handwritten\": ...}` is written by `upload_store._insert_placeholder` and\nread back by the finalize task. Publishing it lets a customer overwrite a\nkey a worker depends on.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-documents-api-openapi.yml#/components/schemas/DocumentUpdateRequest",
  "properties": {
    "folderId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Folderid",
      "description": "`fld_` identifier of the folder to file this document under. Must belong to your organization. Send null to unfile it. Filename and matter cannot be changed: both are part of the stored object's identity."
    }
  },
  "additionalProperties": false,
  "type": "object"
}