{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-bulk-put-assets-request-schema.json",
  "title": "BulkPutAssetsRequest",
  "description": "1–200 assets. Each item needs exactly one of `key` or `sitePath`, and exactly one of `bodyBase64`, `bodyText`, or `importFromUrl` (sitePath items: body only).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-assets-api-openapi.yml#/components/schemas/BulkPutAssetsRequest",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "description": "Path after /assets/ on the site — e.g. photos/hero.webp or style.css. Do not prefix with assets/ or /. Uploaded files are live in the editor and draft preview at once; the published site picks them up at the next publish."
          },
          "sitePath": {
            "type": "string",
            "description": "Store at this exact site path instead of `/assets/{key}` — e.g. `/.well-known/security.txt`, `/ads.txt`, `/favicon.ico`. Send `key` OR `sitePath`."
          },
          "bodyBase64": {
            "type": "string",
            "description": "The file's bytes, base64-encoded. Send this or `importFromUrl`, not both."
          },
          "bodyText": {
            "type": "string",
            "description": "Plain UTF-8 text for text asset keys only (.css, .js, .mjs, .json, .svg, .txt, .xml). Bulk items: send this or `bodyBase64` or `importFromUrl`, not more than one."
          },
          "bodySha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 (64 hex characters) of the bytes you send. A mismatch answers 400 `body_sha256_mismatch` before anything is written."
          },
          "contentType": {
            "type": "string",
            "minLength": 1,
            "description": "The file's MIME type. Defaults to the one implied by the key's extension."
          },
          "importFromUrl": {
            "type": "string",
            "format": "uri",
            "description": "Fetch the file from this URL instead of sending `bodyBase64`. Send this or `bodyBase64`, not both."
          },
          "intent": {
            "type": "string",
            "enum": [
              "hero",
              "column",
              "inline",
              "logo"
            ],
            "description": "The layout role of an image, which sets its size: `hero` (up to 2,400 px) and `column` (1,200 px) also store a smaller `-800` variant; `inline` (800 px) and `logo` (512 px) do not. Defaults to `logo` under `logos/` or `icons/`, otherwise `column`."
          },
          "optimize": {
            "type": "boolean",
            "description": "Default true. `false` stores a raster image exactly as sent, at the key you gave, instead of re-encoding it as WebP."
          }
        }
      },
      "minItems": 1,
      "maxItems": 200
    }
  },
  "required": [
    "items"
  ]
}