{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudinary/json-schema/cloudinary-contract-update-public-page-request-payload-schema.json",
  "title": "Contract.UpdatePublicPageRequestPayload",
  "description": "Partial-update payload. Only the fields you include are forwarded and changed; any field you omit is left unchanged. Sending null does not clear a value.\n",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudinary-platform-openapi.yml#/components/schemas/Contract.UpdatePublicPageRequestPayload",
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "New display name for the public page. Omit to leave the current value unchanged."
    },
    "available_from": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "New activation time for the page. Omit to leave the current value unchanged."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "New expiry time for the page. Omit to leave the current value unchanged."
    },
    "show_download_original_option": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether viewers may download the original asset. Omit to leave the current value unchanged.\n"
    },
    "download_transformations": {
      "type": [
        "array",
        "null"
      ],
      "maxItems": 200,
      "items": {
        "$ref": "#/$defs/Entity.DownloadTransformationInput"
      },
      "description": "Named transformations that viewers of the public page can apply when downloading assets, referenced by name (see the Admin API's [Get transformations](admin_api#get_transformations) endpoint to list the named transformations in your product environment). The list replaces the page's current download transformations; pass an empty list to remove them all. Omit to leave the current value unchanged. At most 200 entries.\n"
    },
    "create_download_transformations": {
      "type": [
        "boolean",
        "null"
      ],
      "default": false,
      "description": "When `true`, any name in `download_transformations` that isn't yet set as a transformation template is set as one automatically. It then appears in the Console's templates list and counts toward your product environment's template limit. When `false` or omitted, the request instead fails with `download_transformation_not_available` if any listed name isn't yet set as a transformation template, and nothing is changed.\n"
    },
    "protection_mode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "none",
        "email_otp"
      ],
      "description": "Secured-sharing protection mode. `none` removes protection and clears the allowed emails, domains and `allow_any`. `email_otp` protects the page so viewers must verify an allowed email address with a one-time passcode; a protected page needs at least one allowed email or domain, or `allow_any: true`. Omit to leave the current mode unchanged: on a protected page the allowlist fields below then update its allowlist, but on an unprotected page they are ignored, so send `email_otp` to protect it.\n"
    },
    "allowed_emails": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "Email addresses allowed to access the page when it is protected. The list replaces the current one; send an empty array to clear it (the page must still satisfy the `allow_any` rule). Together with `allowed_domains`, at most 500 entries. Omit to leave the current value unchanged.\n"
    },
    "allowed_domains": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,}$"
      },
      "description": "Email domains allowed to access the page when it is protected, as bare lowercase domains such as `example.com`. The list replaces the current one; send an empty array to clear it (the page must still satisfy the `allow_any` rule). Together with `allowed_emails`, at most 500 entries. Omit to leave the current value unchanged.\n"
    },
    "allow_any": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether any email address is allowed to access the page when it is protected. After the update, an `email_otp` page needs `allow_any: true` or at least one entry in `allowed_emails` or `allowed_domains`; otherwise the request fails with 400 `invalid_protection_settings`. Omit to leave the current value unchanged.\n"
    },
    "custom_layout_url": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048,
      "pattern": "^(|https://[A-Za-z0-9.-]+\\.cloudinary\\.com/.*)$",
      "description": "URL of a custom HTML page in your product environment to use in place of the public page's default design. It must be an `https` URL on a `cloudinary.com` host that belongs to this product environment, at most 2048 bytes. Setting it requires the custom collection layout feature on your plan; otherwise the request fails with 403. Pass an empty string to return to the default design. Omit to leave the current value unchanged.\n"
    }
  },
  "$defs": {
    "Entity.DownloadTransformationInput": {
      "type": "object",
      "required": [
        "name"
      ],
      "description": "A named transformation to offer for download on a public page.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of an existing named transformation in this product environment."
        },
        "types": {
          "type": [
            "array",
            "null"
          ],
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "description": "Asset types the transformation is offered for. Restrict this to the types the transformation actually produces correct results for (for example, a duration/trim transformation only makes sense for video), to avoid download errors for the other type. This is a property of the transformation template itself, shared by every public page in the product environment, not just this one: it can only be set the first time any public page offers this name for download. Omit `types` on that first request to make it available for both `image` and `video`. If the name is already available for download (set by an earlier request on this or another public page), omit `types` to keep its existing setting, or send its exact current list; sending a different list fails with `download_transformation_types_conflict`. An empty list is rejected.\n"
        }
      }
    }
  }
}