{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pagegoat-com/json-schema/pagegoat-com-set-visibility-request-schema.json",
  "title": "SetVisibilityRequest",
  "description": "Set a site's link-access mode: private, password protected, email capture, or public.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pagegoat-com-openapi.yml#/components/schemas/SetVisibilityRequest",
  "required": [
    "visibility"
  ],
  "type": "object",
  "properties": {
    "visibility": {
      "type": "string",
      "description": "Required.",
      "enum": [
        "private",
        "password",
        "capture",
        "public"
      ]
    },
    "publicRole": {
      "type": [
        "string",
        "null"
      ],
      "description": "Role for anyone who gets in via the link. Meaningful for password, capture and public; ignored (and cleared) for private.",
      "enum": [
        "viewer",
        "commenter"
      ]
    },
    "password": {
      "type": [
        "string",
        "null"
      ],
      "description": "New link password. Required when switching to password mode and the site has none; omit to keep the current one. Setting it signs out everyone currently viewing. Max 128 characters."
    },
    "captureOtp": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether a capture visitor must confirm a six-digit code. False is \"email only, no code\". Only read when visibility is `capture`; absent keeps the current setting."
    },
    "captureReverifyDays": {
      "type": [
        "integer",
        "null"
      ],
      "description": "How many days a confirmed visitor stays confirmed. 0 means every visit re-verifies. Only read when visibility is `capture`.",
      "format": "int32"
    },
    "captureDomains": {
      "type": [
        "string",
        "null"
      ],
      "description": "Comma- or space-separated domains a visitor's address must be at; empty for any domain. Subdomains of a listed domain are accepted. Only read when visibility is `capture`."
    }
  }
}