{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pagegoat-com/json-schema/pagegoat-com-upload-site-form-schema.json",
  "title": "UploadSiteForm",
  "description": "Multipart form for creating a site.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pagegoat-com-openapi.yml#/components/schemas/UploadSiteForm",
  "required": [
    "file",
    "title"
  ],
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Display name. Required."
    },
    "slug": {
      "type": [
        "string",
        "null"
      ],
      "description": "Preferred slug. Derived from the title when omitted, and de-duplicated if taken."
    },
    "visibility": {
      "type": [
        "string",
        "null"
      ],
      "description": "Defaults to private. Password protection is turned on afterwards, from the site's Sharing settings.",
      "enum": [
        "public",
        "private"
      ]
    },
    "publicRole": {
      "type": [
        "string",
        "null"
      ],
      "description": "Role for anyone with the link. Only meaningful when going public.",
      "enum": [
        "viewer",
        "commenter"
      ]
    },
    "file": {
      "type": "string",
      "description": "The file to publish, recognised by its name: an HTML file (`.html`, `.htm`), a ZIP of a multi-file site with an `index.html`, Markdown (`.md`, `.markdown`) or plain text (`.txt`), which are rendered into a page, or a PDF (`.pdf`), shown in pagegoat's viewer. Any other type is refused with 415, and a file whose contents contradict its name (a `.pdf` that isn't a PDF, a `.txt` that is binary) with 400. `GET /api/usage` lists the formats this deployment accepts.",
      "format": "binary"
    }
  }
}