{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-upload-initiate-request-schema.json",
  "title": "UploadInitiateRequest",
  "description": "Ask for somewhere to put a file.\n\n`sizeBytes` is required and is not advisory: it decides the part size and\nthe part count, both of which are fixed for the life of the session. R2\ncannot be asked to assemble parts it was not told to expect, so a size that\nturns out to be wrong fails at complete time rather than corrupting a\ndocument.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-uploads-api-openapi.yml#/components/schemas/UploadInitiateRequest",
  "properties": {
    "matterId": {
      "type": "string",
      "title": "Matterid",
      "description": "`mat_` identifier of the matter to upload into. Must belong to your organization."
    },
    "filename": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Filename",
      "description": "Filename to store, including its extension. Trimmed; whitespace alone is refused. This exact string is used to build the stored object, so it cannot be changed afterwards."
    },
    "contentType": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Contenttype",
      "description": "IANA media type of the file, for example `application/pdf`. Must be on the supported list or the request is refused before any URL is signed."
    },
    "sizeBytes": {
      "type": "integer",
      "maximum": 2147483648.0,
      "exclusiveMinimum": 0.0,
      "title": "Sizebytes",
      "description": "Exact size of the file in bytes. Not advisory: it fixes the part size and part count for the life of the session, and a wrong value fails at complete time. Must be greater than zero."
    },
    "folderId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Folderid",
      "description": "`fld_` identifier to file the document under on the way in. Saves a second call. Must belong to your organization."
    },
    "handwritten": {
      "type": "boolean",
      "title": "Handwritten",
      "description": "Set true for scanned or handwritten pages to route the file through vision OCR instead of the text-layer reader. Leaving it false on a scanned exhibit ingests it badly.",
      "default": false
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "matterId",
    "filename",
    "contentType",
    "sizeBytes"
  ]
}