{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bitbybit-dev/json-schema/bitbybit-dev-file-upload-body-schema.json",
  "title": "FileUploadBody",
  "description": "Request a pre-signed upload URL. After receiving the URL, PUT the raw file bytes to it within the expiration window.",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bitbybit-dev-openapi.json#/components/schemas/FileUploadBody",
  "type": "object",
  "properties": {
    "filename": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Original filename including extension (e.g. 'part.step', 'model.obj'). Used for display and format detection."
    },
    "contentType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "MIME type of the file (e.g. 'application/step', 'model/gltf-binary'). Must match the actual file content."
    },
    "bytes": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 1073741824,
      "description": "Exact file size in bytes. Must match the Content-Length of the subsequent PUT to the upload URL. Maximum: 1 GB."
    },
    "sha256": {
      "description": "SHA-256 hex digest of the file content. When provided, enables server-side deduplication - if an identical file was previously uploaded under this API key, the existing file is reused and no upload is needed.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "filename",
    "contentType",
    "bytes"
  ],
  "additionalProperties": false
}