{"openapi":"3.1.0","info":{"title":"BrewPage API","description":"Free instant hosting for HTML, Markdown, JSON, key-value stores, files and sites. Send ns=public to be found: gallery + Google, Bing & AI search. Omitted ns: private (MCP: a generated private namespace). Password or hidden: unlisted. A private link is not a lock: anyone with it can open it; add a password to restrict. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password. Retain returned links. Save ownerToken privately; send it as X-Owner-Token on later publishes and updates. manageUrl is private: give it only to the owner, never publish it. How BrewPage compares with GitHub Pages, GitHub Gist, Netlify Drop, Cloudflare Drop, Tiiny Host and Static.app: https://brewpage.app/compare. Agents: remote MCP at https://brewpage.app/mcp (no auth).","termsOfService":"https://brewpage.app/terms","contact":{"name":"BrewPage","url":"https://brewpage.app"},"license":{"name":"Apache-2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"version":"2.8.59"},"externalDocs":{"description":"BrewPage API documentation (Scalar)","url":"https://kochetkov-ma.github.io/brewpage-openapi/"},"servers":[{"url":"https://brewpage.app","description":"Generated server url"}],"tags":[{"name":"KV","description":"Key-Value store with up to 1000 keys per store"},{"name":"Owner Token","description":"Get a new owner token (stateless); with an admin token, manage profile tokens."},{"name":"Gallery","description":"Browse public content from the 'public' namespace without password protection; mine=true lists the caller's own publications"},{"name":"Short Links","description":"Short URL resolver for sharing"},{"name":"Owner Check","description":"Lightweight owner-token probe; never increments views or returns content"},{"name":"HTML","description":"HTML page hosting with markdown support"},{"name":"Limits","description":"User-facing upload limits: one source for the UI, agents and docs"},{"name":"Sites","description":"Multi-file HTML site hosting via ZIP or folder upload"},{"name":"Publications","description":"Owner list and stats"},{"name":"preview","description":"Social previews: per-content OpenGraph image (1200×630 JPEG; .png is a legacy URL alias) and OG meta stub for social bots"},{"name":"SEO","description":"Search engine optimization endpoints"},{"name":"JSON","description":"JSON document store with up to 10,000 docs per collection"},{"name":"Stats","description":"Platform-wide usage statistics"},{"name":"Namespace","description":"Fresh, collision-free namespace suggestions"},{"name":"Files","description":"File hosting up to 5 MB per file (video 20 MB), 1000 files per namespace"},{"name":"Hosting Management","description":"Owner-only publication delivery settings"},{"name":"Reports","description":"Abuse reports for hosted content"}],"paths":{"/api/sites/{ns}/{id}":{"get":{"tags":["Sites"],"summary":"Get site info","description":"Returns site metadata and file list. Requires owner token","operationId":"getSiteInfo","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this site"}],"responses":{"200":{"description":"Site info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInfoResponse"}}}},"403":{"description":"Missing or wrong owner token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Site not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"ManageKey":[]}]},"put":{"tags":["Sites"],"summary":"Update site","description":"Replaces the multi-file site bundle (ZIP archive or individual files with paths). Requires the owner token returned at creation. Password is preserved as-is (not changed in this operation).","operationId":"republishSite","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tags","in":"query","description":"Comma-separated tags; replace the stored tags (empty clears). Omit to keep them","required":false,"schema":{"type":"string"},"example":"demo,portfolio"},{"name":"ttl","in":"query","description":"Ignored: updates keep the original expiry; a supplied value is reported in notices (ttl-ignored).","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","description":"Ignored on update: republishing keeps the address mode (reported in deliveryNotice); sites always stay on their own subdomain","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this site"},{"name":"entry","in":"query","description":"Entry HTML file path (.html or .htm). Default: index.html, else the shallowest HTML file; a missing or non-HTML entry falls back to it and is reported in notices","schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","anyOf":[{"type":"object","required":["archive"]},{"type":"object","required":["files"]}],"properties":{"archive":{"type":"string","format":"binary","description":"ZIP archive; takes precedence over individual files."},"files":{"type":"array","items":{"type":"string","format":"binary"},"minItems":1},"paths":{"type":"array","description":"Optional paths aligned with files; omitted paths use original filenames.","items":{"type":"string"}}}}}},"required":true},"responses":{"200":{"description":"Site updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteUpdateResponse"}}}},"400":{"description":"Invalid request, empty bundle or limits exceeded; see GET /api/limits; or PDF/Office file unreadable or password-protected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request over the per-request size, too many files and form fields, or a file path too long; see GET /api/limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing or wrong owner token, or upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Site not found or expired; body has createUrl: POST the content there to publish anew","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Site is no longer available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"No servable file left: every file has an unsupported or missing extension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Busy; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"delete":{"tags":["Sites"],"summary":"Delete site","description":"Permanently removes the site and all its files from storage","operationId":"deleteSite","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this site"}],"responses":{"204":{"description":"Site deleted"},"403":{"description":"Missing or wrong owner token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Site not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/kv/{ns}/{id}/{key}":{"get":{"tags":["KV"],"summary":"Get key value","description":"Returns the value and last update timestamp for a specific key","operationId":"getKey","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvGetResponse"}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Store or key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]},"put":{"tags":["KV"],"summary":"Upsert key","description":"Creates or updates a key in the store; max 1000 keys per store","operationId":"upsertKey","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this store"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvUpsertKeyRequest"}}},"required":true},"responses":{"200":{"description":"Key upserted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvUpsertKeyResponse"}}}},"400":{"description":"Invalid key or value; key name `hosting` is reserved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Store not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Key limit exceeded, or old publication is read-only (code: OLD_PUBLICATION_READ_ONLY; publish anew via createUrl)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"delete":{"tags":["KV"],"summary":"Delete key","description":"Removes a single key from the store; deleting the last key removes the store","operationId":"deleteKey","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this store"}],"responses":{"204":{"description":"Key deleted"},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Store or key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/json/{ns}/{id}":{"get":{"tags":["JSON"],"summary":"Get JSON document","description":"Returns raw JSON content with application/json content type","operationId":"getById","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON content","content":{"application/json":{"schema":{}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]},"put":{"tags":["JSON"],"summary":"Update JSON document","description":"Replaces document content; requires the owner token returned at creation or the management key","operationId":"update","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","description":"Ignored on update: republishing keeps the address mode (reported in deliveryNotice); change it with the hosting operation","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this document"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Document updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonUpdateResponse"}}}},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found or expired; body has createUrl: POST the content there to publish anew","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"delete":{"tags":["JSON"],"summary":"Delete JSON document","description":"Permanently removes the document","operationId":"delete","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this document"}],"responses":{"204":{"description":"Document deleted"},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/html/{ns}/{id}":{"get":{"tags":["HTML"],"summary":"Get HTML page","description":"Returns rendered HTML content. Protected OLD pages accept X-Password or ?p=; NEW pages use X-Password or a reader access cookie. The owner token bypasses password protection when no password is supplied.","operationId":"getById_1","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTML content","content":{"text/html":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/tab-separated-values":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/xml":{"schema":{"type":"string"}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Page not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]},"put":{"tags":["HTML"],"summary":"Update HTML page","description":"Replaces page content; requires the owner token returned at creation or the management key. Also accepts raw text/* (HTML, Markdown, YAML, XML, CSV, code) bodies — see /llms-full.txt.","operationId":"update_1","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Optional new content format on republish. Accepts 'html', 'markdown'/'md', or any code format (yaml, json, xml, csv, tsv, log, toml, ini, sql, sh, bat, env, javascript, typescript, tsx, jsx, css, properties, docker, txt). When omitted, the row's stored format is preserved. Body field 'format' on HtmlUpdateRequest takes precedence over the query param when both are present.","required":false,"schema":{"type":"string"}},{"name":"tags","in":"query","description":"Comma-separated tags; replace the stored tags (empty clears). Omit to keep them","required":false,"schema":{"type":"string"},"example":"demo,test"},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"},{"name":"verbatim","in":"query","description":"Store the content exactly as sent. By default a whole HTML page pasted from a chat (wrapped in a code block, surrounded by chat text, or entity-escaped) is restored and a notice is returned; 'true' keeps the text as is.","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlUpdateRequest"}},"text/html":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/yaml":{"schema":{"type":"string"}},"text/css":{"schema":{"type":"string"}},"text/javascript":{"schema":{"type":"string"}},"text/x-toml":{"schema":{"type":"string"}},"text/xml":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/yaml":{"schema":{"type":"string"}},"application/x-yaml":{"schema":{"type":"string"}},"application/javascript":{"schema":{"type":"string"}},"application/toml":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Page updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlUpdateResponse"}}}},"403":{"description":"Missing or wrong owner token or management key, or upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Page not found or expired; body has createUrl: POST the content there to publish anew","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl (API) or republishUrl (browser)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"delete":{"tags":["HTML"],"summary":"Delete HTML page","description":"Permanently removes page and frees the short URL","operationId":"delete_1","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"204":{"description":"Page deleted"},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Page not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/files/{ns}/{id}":{"get":{"tags":["Files"],"summary":"Download file","description":"Returns file inline for previewable types (images, PDF, media) or as attachment. Add ?dl=1 to force download. An HTML file published as a page in 'public' redirects to GET /api/html/public/{id}.","operationId":"download","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"dl","in":"query","description":"Force download as attachment","required":false,"schema":{"type":"boolean"}},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"File content","headers":{"X-BrewPage-Notice":{"description":"Archives only: contents unverified; check before opening.","schema":{"type":"string","enum":["archive-unverified"]}}},"content":{"*/*":{"schema":{"type":"object"}}}},"308":{"description":"HTML file published as a page; Location: /api/html/public/{id} (query string kept)","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"File not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]},"put":{"tags":["Files"],"summary":"Replace file","description":"Replaces the file content (multipart 'file'); same type rules and limits as upload. Keeps link, password, TTL and tags. For an HTML file published as a page in 'public', replaces that page (UTF-8 .html/.htm, same rules as PUT /api/html).","operationId":"replaceFile","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ttl","in":"query","description":"Ignored: updates keep the original expiry; a supplied value is reported in notices (ttl-ignored).","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File part; any single file part is accepted when 'file' is absent"}}}}},"required":true},"responses":{"200":{"description":"File replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdateResponse"}}}},"400":{"description":"Invalid request or file too large; or PDF/Office file unreadable or password-protected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing or wrong owner token or management key, or upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"File not found or expired; body has createUrl: POST the content there to publish anew","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY; publish anew via createUrl), or the same content is another file of this owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unsupported file type or content of no supported type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Busy; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"delete":{"tags":["Files"],"summary":"Delete file","description":"Permanently removes the file from storage. For an HTML file published as a page in 'public', deletes that page (same owner token)","operationId":"delete_2","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"204":{"description":"File deleted"},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"File not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/password":{"post":{"tags":["Hosting Management"],"summary":"Set, change or remove the reader password","operationId":"setPassword","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResponse"}}}},"403":{"description":"Missing or wrong owner token or management key; token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable (outside public also for wrong credentials)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Password too short","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/visibility":{"post":{"tags":["Hosting Management"],"summary":"Hide or show a public publication in gallery & search. Link unchanged","operationId":"setVisibility","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityResponse"}}}},"403":{"description":"Missing or wrong owner token or management key; token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable (outside public also for wrong credentials)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/rotate":{"post":{"tags":["Hosting Management"],"summary":"Change link: new id, the old link stops working","operationId":"rotatePublicationLink","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token","required":false,"schema":{"type":"string"}},{"name":"X-Manage-Key","in":"header","description":"Management key","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationRotateResponse"}}}},"403":{"description":"Missing or wrong owner token or management key; token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable (outside public also for wrong credentials)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Link changes temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits; or ROTATE_LIMITED: at most 3 link changes a day","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/manage-key":{"post":{"tags":["Hosting Management"],"summary":"Mint or reset the management link; the old link stops working","operationId":"resetManageKey","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageKeyResponse"}}}},"403":{"description":"Missing or wrong owner token or management key; token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable (outside public also for wrong credentials)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/extend":{"post":{"tags":["Hosting Management"],"summary":"Extend storage to 90 days from now (profile owners); never shortens","operationId":"extendPublication","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendResponse"}}}},"403":{"description":"Missing or wrong owner token or management key; token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable (outside public also for wrong credentials)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Old publication is read-only (code: OLD_PUBLICATION_READ_ONLY); publish anew via createUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/{type}/{ns}/{id}/access/revoke":{"post":{"tags":["Hosting Management"],"summary":"Revoke reader access to a new protected publication","operationId":"revokeReaderAccess","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRevokeResponse"}}}},"400":{"description":"Reader access revocation requires a NEW protected publication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing or wrong owner token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/sites":{"post":{"tags":["Sites"],"summary":"Upload site","description":"Upload a multi-file HTML site as a ZIP archive or as individual files with paths. Returns a link to the published site. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.","operationId":"uploadSite","parameters":[{"name":"ns","in":"query","description":"Send ns=public for anything meant to be found or shared (docs, guides, demos, portfolios, reports, landing pages): listed in the public gallery and sitemap, so Google, Bing and AI search index it and people discover it. A site always gets its own subdomain. Anyone can find and read a public page: never put secrets, tokens or personal data there. No ns (default): private. Unlisted and not indexed; anyone who has the link can still open it. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"tags","in":"query","description":"Comma-separated tags","required":false,"schema":{"type":"string"},"example":"demo,portfolio"},{"name":"ttl","in":"query","description":"TTL in days (1-30, up to 90 with an X-Owner-Token in a profile); omitted or blank uses 15 days. Accepts 15, 15d, 15 days; h/w/mo/y units round up to whole days. Out-of-range values are clamped and unparseable ones use the default; each adjustment is reported in notices.","required":false,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Reuse existing owner token to group entities under one owner"},{"name":"entry","in":"query","description":"Entry HTML file path (.html or .htm). Default: index.html, else the shallowest HTML file; a missing or non-HTML entry falls back to it and is reported in notices","schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","anyOf":[{"type":"object","required":["archive"]},{"type":"object","required":["files"]}],"properties":{"archive":{"type":"string","format":"binary","description":"ZIP archive; takes precedence over individual files."},"files":{"type":"array","items":{"type":"string","format":"binary"},"minItems":1},"paths":{"type":"array","description":"Optional paths aligned with files; omitted paths use original filenames.","items":{"type":"string"}}}}}},"required":true},"responses":{"201":{"description":"Site uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteUploadResponse"}}}},"400":{"description":"Invalid request, no HTML files, or limits exceeded; see GET /api/limits; or PDF/Office file unreadable or password-protected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request over the per-request size, too many files and form fields, or a file path too long; see GET /api/limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"No servable file left: every file has an unsupported or missing extension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Busy; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/reports":{"post":{"tags":["Reports"],"summary":"Submit abuse report","description":"Records a public report about a resource hosted on brewpage.app for moderator review","operationId":"submitReport","parameters":[{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"required":true},"responses":{"201":{"description":"Report accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many reports from this address today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/owner-token/revoke":{"post":{"tags":["Owner Token"],"summary":"Delete a profile token by id or token; it stops working everywhere, its publications stay","operationId":"revokeOwnerToken","parameters":[{"name":"X-Owner-Token","in":"header","description":"Admin token of the profile","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeRequest"}}}},"responses":{"200":{"description":"Revoked (false = already revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeResponse"}}}},"403":{"description":"Header token not admin, not in a profile, revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not a token of this profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]}]}},"/api/owner-token/revoke-others":{"post":{"tags":["Owner Token"],"summary":"Delete every other active profile token","operationId":"revokeOtherOwnerTokens","parameters":[{"name":"X-Owner-Token","in":"header","description":"Admin token of the profile","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeOthersRequest"}}}},"responses":{"200":{"description":"Number of tokens deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeOthersResponse"}}}},"403":{"description":"Header token not admin, not in a profile, revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]}]}},"/api/owner-token/mint":{"post":{"tags":["Owner Token"],"summary":"Mint a profile token with scope and expiry; the token is shown once","operationId":"mintOwnerToken","parameters":[{"name":"X-Owner-Token","in":"header","description":"Admin token of the profile","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintRequest"}}}},"responses":{"201":{"description":"Minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintResponse"}}}},"400":{"description":"Invalid label, scope or expiresIn","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Header token not admin, not in a profile, revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Active token limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]}]}},"/api/owner-token/bind":{"post":{"tags":["Owner Token"],"summary":"Add a token to your profile (as publish)","operationId":"bindOwnerToken","parameters":[{"name":"X-Owner-Token","in":"header","description":"Admin token of the profile","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindRequest"}}}},"responses":{"200":{"description":"Bound (also when already in the profile)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindResponse"}}}},"400":{"description":"Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Header token not admin, not in a profile, revoked or expired; or body token revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Active token limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]}]}},"/api/kv":{"get":{"tags":["KV"],"summary":"List KV stores","description":"Returns all KV stores owned by the given token in the namespace. Returns empty list without token","operationId":"listStores","parameters":[{"name":"ns","in":"query","description":"Namespace. Omitted: private. `public` = gallery & search. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to filter by ownership. Without token returns empty list"}],"responses":{"200":{"description":"Store list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KvStoreListResponse"}}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]},"post":{"tags":["KV"],"summary":"Create KV store","description":"Creates a new store with an initial key-value pair and returns a shareable link. Reuse existing owner token to group entities under one owner. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.","operationId":"createStore","parameters":[{"name":"ns","in":"query","description":"No ns (default): private. ns=public: the shared public namespace. JSON and KV are never listed in the gallery or indexed, in any namespace; anyone who has the link can open it. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"tags","in":"query","description":"Comma-separated tags","required":false,"schema":{"type":"string"},"example":"demo,test"},{"name":"ttl","in":"query","description":"TTL in days (1-30, up to 90 with an X-Owner-Token in a profile); omitted or blank uses 15 days. Accepts 15, 15d, 15 days; h/w/mo/y units round up to whole days. Out-of-range values are clamped and unparseable ones use the default; each adjustment is reported in notices.","required":false,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password; protected stores are unlisted. NEW browser links use trusted unlock; programmatic reads use X-Password","required":false,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","description":"Delivery mode for a new store: path or subdomain","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Reuse existing owner token to group entities under one owner. If omitted, a new token is generated"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvCreateStoreRequest"}}},"required":true},"responses":{"201":{"description":"Store created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvCreateStoreResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/json":{"get":{"tags":["JSON"],"summary":"List JSON documents","description":"Returns documents owned by the given token. Empty list without token","operationId":"list","parameters":[{"name":"ns","in":"query","description":"Namespace. Omitted: private. `public` = gallery & search. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to filter by ownership. Without token returns empty list"}],"responses":{"200":{"description":"Document list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JsonListResponse"}}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]},"post":{"tags":["JSON"],"summary":"Create JSON document","description":"Stores any valid JSON and returns a shareable link. Reuse existing owner token to group entities under one owner. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.","operationId":"create","parameters":[{"name":"ns","in":"query","description":"No ns (default): private. ns=public: the shared public namespace. JSON and KV are never listed in the gallery or indexed, in any namespace; anyone who has the link can open it. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"tags","in":"query","description":"Comma-separated tags","required":false,"schema":{"type":"string"},"example":"demo,test"},{"name":"ttl","in":"query","description":"TTL in days (1-30, up to 90 with an X-Owner-Token in a profile); omitted or blank uses 15 days. Accepts 15, 15d, 15 days; h/w/mo/y units round up to whole days. Out-of-range values are clamped and unparseable ones use the default; each adjustment is reported in notices.","required":false,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password; protected documents are unlisted. NEW browser links use trusted unlock; programmatic reads accept X-Password","required":false,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","description":"Delivery mode for a new document: path or subdomain","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Reuse existing owner token to group entities under one owner. If omitted, a new token is generated"}],"requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"201":{"description":"Document created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonCreateResponse"}}}},"400":{"description":"Invalid JSON or request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/html":{"post":{"tags":["HTML"],"summary":"Create HTML page","description":"Stores HTML or markdown content and returns a shareable link. Reuse existing owner token to group entities under one owner. Also accepts raw text/* (HTML, Markdown, YAML, XML, CSV, code) and application/octet-stream bodies — see /llms-full.txt. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.","operationId":"create_1","parameters":[{"name":"ns","in":"query","description":"Send ns=public for anything meant to be found or shared (docs, guides, demos, portfolios, reports, landing pages): listed in the public gallery and sitemap, so Google, Bing and AI search index it and people discover it. Public pages are served on the brewpage.app domain itself, for the strongest search reach; code that needs its own origin (cookies, storage) gets its own subdomain automatically. Anyone can find and read a public page: never put secrets, tokens or personal data there. No ns (default): private. Unlisted and not indexed; anyone who has the link can still open it. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"tags","in":"query","description":"Comma-separated tags","required":false,"schema":{"type":"string"},"example":"demo,test"},{"name":"ttl","in":"query","description":"TTL in days (1-30, up to 90 with an X-Owner-Token in a profile); omitted or blank uses 15 days. Accepts 15, 15d, 15 days; h/w/mo/y units round up to whole days. Out-of-range values are clamped and unparseable ones use the default; each adjustment is reported in notices.","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Content format. 'html' (default) — stored as sent, except a whole page pasted from a chat is repaired (see 'verbatim'); omitted, source code or JSON is saved as its code format (notice format-detected). 'markdown' / 'md' — rendered to styled HTML via github-markdown-css. Code/text languages stored and served raw with format-specific MIME (text/csv, application/json, text/plain) plus X-Content-Type-Options: nosniff; raw reads of xml answer text/plain, downloads keep text/xml: yaml, json, xml, csv, tsv, log, toml, ini, sql, sh, bat, env, javascript, typescript, tsx, jsx, css, properties, docker, txt","required":false,"schema":{"type":"string","default":"html"}},{"name":"X-Password","in":"header","description":"Access password. Empty means no password restriction. Protected pages are never listed in the gallery or sitemap. OLD links accept ?p=; NEW access uses X-Password or a reader access cookie after password entry.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"verbatim","in":"query","description":"Store the content exactly as sent. By default a whole HTML page pasted from a chat (wrapped in a code block, surrounded by chat text, or entity-escaped) is restored and a notice is returned; 'true' keeps the text as is.","schema":{"type":"boolean"}},{"name":"X-Owner-Token","in":"header","description":"Reuse existing owner token to group entities under one owner. If omitted, a new token is generated"},{"name":"X-Delivery-Mode","in":"header","description":"NEW delivery preference: path or subdomain. Sites and non-public HTML pages get subdomain; a mismatch is reported in deliveryModeReason, not rejected. Omission allows smart selection.","required":false,"schema":{"type":"string","enum":["path","subdomain"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlUploadRequest"}},"text/html":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/yaml":{"schema":{"type":"string"}},"text/css":{"schema":{"type":"string"}},"text/javascript":{"schema":{"type":"string"}},"text/x-toml":{"schema":{"type":"string"}},"text/xml":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/yaml":{"schema":{"type":"string"}},"application/x-yaml":{"schema":{"type":"string"}},"application/javascript":{"schema":{"type":"string"}},"application/toml":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"201":{"description":"Page created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlUploadResponse"}}}},"400":{"description":"Invalid request parameters; or PDF/Office file unreadable or password-protected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Busy; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/files":{"get":{"tags":["Files"],"summary":"List files","description":"Returns files owned by the given token. Empty list without token","operationId":"list_1","parameters":[{"name":"ns","in":"query","description":"Namespace. Omitted: private. `public` = gallery & search. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to filter by ownership. Without token returns empty list"}],"responses":{"200":{"description":"File list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileListResponse"}}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]},"post":{"tags":["Files"],"summary":"Upload file","description":"Stores a file via multipart upload and returns a download link. Only safe file types accepted; a missing or wrong extension is corrected from the content and reported in notices. Reuse existing owner token to group entities under one owner. A UTF-8 .html/.htm file sent to namespace 'public' without a password is published as an HTML page (same rules and limits as POST /api/html): link and ownerLink point to the page, notice 'html-file-as-page'. Any other HTML file is stored as a file and shown as source, notice 'html-file-as-source'; to publish such a page use POST /api/html. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.","operationId":"upload","parameters":[{"name":"ns","in":"query","description":"Send ns=public for anything meant to be found or shared (docs, guides, demos, portfolios, reports, landing pages): listed in the public gallery and sitemap, so Google, Bing and AI search index it and people discover it. Public pages are served on the brewpage.app domain itself, for the strongest search reach; code that needs its own origin (cookies, storage) gets its own subdomain automatically. Anyone can find and read a public page: never put secrets, tokens or personal data there. No ns (default): private. Unlisted and not indexed; anyone who has the link can still open it. Lowercase only.","required":false,"schema":{"type":"string","pattern":"^$|^[a-z0-9-]{1,32}$"}},{"name":"tags","in":"query","description":"Comma-separated tags","required":false,"schema":{"type":"string"},"example":"demo,test"},{"name":"ttl","in":"query","description":"TTL in days (1-30, up to 90 with an X-Owner-Token in a profile); omitted or blank uses 15 days. Accepts 15, 15d, 15 days; h/w/mo/y units round up to whole days. Out-of-range values are clamped and unparseable ones use the default; each adjustment is reported in notices.","required":false,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password. Empty = public file visible in gallery. With password = hidden from gallery; readers unlock the publication or use X-Password for API access","required":false,"schema":{"type":"string"}},{"name":"X-Delivery-Mode","in":"header","required":false,"schema":{"type":"string"}},{"name":"verbatim","in":"query","description":"For an HTML file published as a page: store it exactly as sent. By default a whole HTML page pasted from a chat (wrapped in a code block, surrounded by chat text, or entity-escaped) is restored and a notice is returned; 'true' keeps the text as is.","schema":{"type":"boolean"}},{"name":"X-Owner-Token","in":"header","description":"Reuse existing owner token to group entities under one owner. If omitted, a new token is generated"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File part; any single file part is accepted when 'file' is absent"}}}}},"required":true},"responses":{"201":{"description":"File uploaded, or HTML file published as a page. Header X-Existing-Resource: 1 when an existing publication with the same content was returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}},"400":{"description":"Invalid request or file too large; or PDF/Office file unreadable or password-protected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Upload refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unsupported file type or content of no supported type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Busy; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/{type}/{ns}/{id}/hosting":{"get":{"tags":["Hosting Management"],"summary":"Read owner-only publication delivery settings","operationId":"getHosting","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostingReadResponse"}}}},"403":{"description":"Missing or wrong owner token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Publication unavailable; owner credentials valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]},"patch":{"tags":["Hosting Management"],"summary":"Change delivery mode for a new publication. Sites and non-public HTML pages stay on subdomain; mismatches are reported, not rejected","operationId":"updateHosting","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","files","json","kv","sites"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostingUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostingProjection"}}}},"400":{"description":"Unknown delivery mode or malformed expectedVersion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing or wrong owner token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Publication unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Hosting changes temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/{ns}/{id}":{"get":{"tags":["Short Links"],"summary":"Open short link","description":"Serves the publication behind the link: page, site, file, JSON or KV. 410 for a deleted public publication; otherwise 404.","operationId":"resolve","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password for protected resources","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"dl","in":"query","description":"Force download as attachment","required":false,"schema":{"type":"boolean"}},{"name":"raw","in":"query","description":"Bypass SPA: stream raw bytes directly (used by <video src>, <iframe src> for PDF, embed cases)","required":false,"schema":{"type":"boolean"}},{"name":"inline","in":"query","description":"Legacy site wrapper bypass; NEW publications retain stored hosting and protection policies","required":false,"schema":{"type":"boolean"}},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Resolve","in":"header","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token; when supplied, response carries X-Is-Owner: true on match","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]}},"/{ns}/{id}/{sub}":{"get":{"tags":["Short Links"],"summary":"Open short-link sub-path","description":"Serves a site file or KV value under the link. Any miss is 404.","operationId":"resolveWithSub","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sub","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password for protected resources","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"dl","in":"query","description":"Force download as attachment","required":false,"schema":{"type":"boolean"}},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Resolve","in":"header","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token; when supplied, response carries X-Is-Owner: true on match","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]}},"/{key}.txt":{"get":{"tags":["SEO"],"summary":"IndexNow key verification","description":"Serves the IndexNow verification key file for search engine crawlers","operationId":"serveKeyFile","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key file content","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Unknown key"}}}},"/preview/{ns}/{id}/{variant}.webp":{"get":{"tags":["preview"],"summary":"WebP preview","description":"thumb-d 800x373, thumb-m 320x149, full (page top, else the 1200 px card); same gates as the card","operationId":"previewWebp","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"variant","in":"path","required":true,"schema":{"type":"string","enum":["thumb-d","thumb-m","full"]}},{"name":"v","in":"query","description":"Version from a server-built URL","required":false,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"WebP bytes","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Not modified"},"404":{"description":"No preview"},"429":{"description":"Per-IP rate limit exceeded"}}}},"/preview/{ns}/{id}.png":{"get":{"tags":["preview"],"summary":"Per-content OG image (legacy URL)","description":"Legacy alias of /preview/{ns}/{id}.jpg for links shared earlier: serves the same JPEG card with identical bytes, headers and fallbacks","operationId":"preview","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Image bytes","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Fallback to static og-image.png (flag off, no source, render gate busy, error)"},"304":{"description":"Not modified (If-None-Match matched current ETag)"},"429":{"description":"Per-IP rate limit exceeded"}}}},"/preview/{ns}/{id}.jpg":{"get":{"tags":["preview"],"summary":"Per-content OG image","description":"Canonical og:image URL. Returns the 1200×630 JPEG card, cached, with ETag/If-None-Match support; non-public namespaces and protected content add X-Robots-Tag: noindex; falls back to /og-image.png?v=3 on any failure","operationId":"previewJpeg","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Image bytes","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Fallback to static og-image.png (flag off, no source, render gate busy, error)"},"304":{"description":"Not modified (If-None-Match matched current ETag)"},"429":{"description":"Per-IP rate limit exceeded"}}}},"/preview-html/{ns}/{id}":{"get":{"tags":["preview"],"summary":"OpenGraph HTML stub","description":"Tiny HTML response with og:title/og:description/og:image meta tags for social-bot unfurls","operationId":"previewHtml","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTML stub with OG meta (or generic stub when resource is missing)","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/galleries":{"get":{"tags":["SEO"],"summary":"Flat HTML index of all current public publications","description":"Renders a minimal, bot-friendly anchor index of every current public site, page, image and video, paginated with rel=prev/next. Sorted by popularity (top 50 by views) then by recency. Underlying data is cached for ~2h.","operationId":"galleries","parameters":[{"name":"page","in":"query","description":"1-based page number; omitted = page 1","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTML index page","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Page number invalid or past the last page"}}}},"/api/{ns}/{id}/owner-check":{"get":{"tags":["Owner Check"],"summary":"Verify whether the supplied X-Owner-Token or X-Manage-Key owns the resource","description":"Returns `{isOwner, type}`, plus `format` for an `html`-type resource. 404 or 410 exactly as reading the resource would answer. 200 with `isOwner:false` when no credential is sent or it does not own the resource.","operationId":"ownerCheck","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to verify"},{"name":"X-Manage-Key","in":"header","description":"Management key to verify"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerCheckResponse"}}}}},"security":[{},{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/stats":{"get":{"tags":["Stats"],"summary":"Get platform stats","description":"Returns today's and all-time creation/view counts with per-type breakdown. Optional 'tz' query param (IANA id) controls the boundary of 'today'; defaults to UTC.","operationId":"getStats","parameters":[{"name":"tz","in":"query","description":"IANA timezone id for the 'today' boundary. Defaults to UTC. Example: Europe/Lisbon","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Platform statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}}}},"/api/sitemap.xml":{"get":{"tags":["SEO"],"summary":"Dynamic XML sitemap","description":"Generates sitemap with static pages and all public gallery entries. Caddy should route /sitemap.xml to this endpoint","operationId":"sitemap","responses":{"200":{"description":"Sitemap XML","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/api/sitemap-index.xml":{"get":{"tags":["SEO"],"summary":"Top-level sitemap index","description":"sitemaps.org 0.9 sitemapindex pointing at /sitemap.xml and /sitemap-images.xml. Advertised in robots.txt so crawlers discover both children from a single URL. Caddy should route /sitemap-index.xml to this endpoint.","operationId":"sitemapIndex","responses":{"200":{"description":"Sitemap index XML","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/api/sitemap-images.xml":{"get":{"tags":["SEO"],"summary":"Google image-sitemap","description":"Per-content OG preview URLs (sitemap-image/1.1) for every qualifying public HTML/site publication. Reuses the publishable-items Caffeine cache slot shared with /sitemap.xml. Caddy should route /sitemap-images.xml to this endpoint.","operationId":"sitemapImages","responses":{"200":{"description":"Image sitemap XML","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/api/publications":{"get":{"tags":["Publications"],"summary":"List my publications","description":"Rows of the owner token; a profile token lists the whole profile. Newest first.","operationId":"listPublications","parameters":[{"name":"type","in":"query","description":"html, site, file, json or kv","required":false,"schema":{"type":"string","enum":["html","site","file","json","kv"]}},{"name":"status","in":"query","description":"public, hidden, private, password or unavailable","required":false,"schema":{"type":"string","enum":["public","hidden","private","password","unavailable"]}},{"name":"q","in":"query","description":"Title search","required":false,"schema":{"type":"string"}},{"name":"expiring","in":"query","description":"Only rows expiring within 7 days","required":false,"schema":{"type":"boolean","default":false}},{"name":"cursor","in":"query","description":"nextCursor of the previous page","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 1-24 (default 24)","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Owner-Token","in":"header","description":"Owner token","required":true}],"responses":{"200":{"description":"One page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Owner token revoked or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]}]}},"/api/publications/{type}/{ns}/{id}/preview/{variant}.webp":{"get":{"tags":["preview"],"summary":"Owner WebP preview","description":"Real content of password rows for the owner (X-Owner-Token or X-Manage-Key); others get the public variant","operationId":"ownerPreviewWebp","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","site","file","json","kv"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"variant","in":"path","required":true,"schema":{"type":"string","enum":["thumb-d","thumb-m","full"]}},{"name":"v","in":"query","description":"Version from a server-built URL","required":false,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token","required":false,"schema":{"type":"string"}},{"name":"X-Manage-Key","in":"header","description":"Management key","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"WebP bytes","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Not modified"},"404":{"description":"No preview or not the owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Owner rate limit exceeded"}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/publications/{type}/{ns}/{id}/stats":{"get":{"tags":["Publications"],"summary":"Publication stats","description":"Daily humans/automated, visitors, hours, devices, link previews, countries, referrer hosts","operationId":"getPublicationStats","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["html","site","file","json","kv"]}},{"name":"ns","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"Days: 7, 30 or 90","required":false,"schema":{"type":"integer","format":"int32","default":30}},{"name":"tz","in":"query","description":"IANA time zone for hours (default UTC)","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token"},{"name":"X-Manage-Key","in":"header","description":"Management key"}],"responses":{"200":{"description":"Stats for the range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationStatsReport"}}}},"400":{"description":"Invalid range or tz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found or not the owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/owner-token":{"get":{"tags":["Owner Token"],"summary":"Mint a fresh owner token and its derived owner id","description":"Returns `{token, ownerId}` where `token` is a 32-char base62 owner token and `ownerId` is its 64-char lowercase SHA-256 hex. Stateless: nothing is persisted. Send the returned token as `X-Owner-Token` when publishing to claim ownership.","operationId":"generateOwnerToken","responses":{"200":{"description":"Fresh owner token minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerTokenResponse"}}}},"429":{"description":"Rate limit exceeded for this IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/namespace/random":{"get":{"tags":["Namespace"],"summary":"Suggest a random namespace","description":"Returns a fresh `<word>-<word>-NN` namespace from the EFF Short Wordlist that does not collide with any existing resource. Pure read; no resource is allocated.","operationId":"randomNamespace","responses":{"200":{"description":"Namespace suggested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RandomNamespaceResponse"}}}},"503":{"description":"Namespace pool exhausted — retry budget hit consecutive collisions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/limits":{"get":{"tags":["Limits"],"summary":"Upload limits per type","description":"Returns the size, count, TTL and file-type limits for HTML, JSON, KV, files and sites. Sizes are bytes; `maxTotalBytes` counts uncompressed files, `maxArchiveExpansionBytes` every inflated ZIP byte including skipped system files (`skippedFileNames`, `skippedRootFolders`), which never count toward the limits. `reach` is always sent: `profile` only for an `X-Owner-Token` active in a profile, else `token`; `ownerMaxTtlDays` only for a usable `X-Owner-Token`; an unusable token gets the anonymous answer.","operationId":"getLimits","parameters":[{"name":"X-Owner-Token","in":"header","description":"Optional owner token"}],"responses":{"200":{"description":"Current upload limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsResponse"}}}},"429":{"description":"Rate limit exceeded for this IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/kv/{ns}/{id}":{"get":{"tags":["KV"],"summary":"List keys","description":"Returns all key names and total count for a store","operationId":"listKeys","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KvListKeysResponse"}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Store not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]},"delete":{"tags":["KV"],"summary":"Delete entire KV bucket (all keys under ns/id)","description":"Permanently removes all keys in the store; requires the owner token returned at creation or the management key","operationId":"deleteKvStore","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this store"}],"responses":{"204":{"description":"Bucket deleted"},"403":{"description":"Missing or wrong owner token or management key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Store not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited: wait Retry-After (= retryAfterSeconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/html/{ns}/{id}/source":{"get":{"tags":["HTML"],"summary":"Get HTML page raw source","description":"Returns the stored source content (pre-render, pre-sanitize; a chat-pasted page as repaired at publish unless sent with verbatim=true) plus metadata for republish. Owner-only: the owner token or the management key.","operationId":"getHtmlSource","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"Raw source body and metadata","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"No owner token or management key (code: OWNER_TOKEN_REQUIRED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Wrong owner token (public namespace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Page unavailable: missing, expired, or not proven outside public","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/html/{ns}/{id}/settings":{"get":{"tags":["HTML"],"summary":"Get HTML page settings","description":"Returns republish-prefill settings (namespace, ttlDays, hasPassword, showTopBar, format, title, filename, createdAt, expiresAt, readOnly) without the content body. Owner-only: the owner token or the management key.","operationId":"getHtmlSettings","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token returned at creation"},{"name":"X-Manage-Key","in":"header","description":"Management key of this publication"}],"responses":{"200":{"description":"Settings projection","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"No owner token or management key (code: OWNER_TOKEN_REQUIRED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Wrong owner token (public namespace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Page unavailable: missing, expired, or not proven outside public","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/hosts/{host}/owner-check":{"get":{"tags":["Owner Check"],"summary":"Verify whether the supplied X-Owner-Token or X-Manage-Key owns the publication on a host","description":"200 `{isOwner:false}` alike for unknown, retired, hidden and not-owned hosts; an owner gets `{isOwner:true, type, namespace, id}`.","operationId":"hostOwnerCheck","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to verify"},{"name":"X-Manage-Key","in":"header","description":"Management key to verify"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostOwnerCheckResponse"}}}}},"security":[{},{"OwnerToken":[]},{"ManageKey":[]}]}},"/api/gallery":{"get":{"tags":["Gallery"],"summary":"Browse gallery","description":"Lists live public publications (pages, files, sites; public namespace, no password, not hidden by the owner) with optional case-insensitive search by title (filename for files, id when untitled). When `mine=true` and `X-Owner-Token` is supplied, returns all of the caller's live pages, files and sites in any namespace, including password-protected ones (a token active in a profile lists the profile's rows; `scope` says which); each item carries its real `namespace`, a `visibility` of my_public, my_public_password or my_private, and `listed`. KV and JSON stores are never listed.","operationId":"getGallery","parameters":[{"name":"q","in":"query","description":"Case-insensitive substring search by title (filename for files, id when untitled)","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (1-based)","required":false,"schema":{"type":"integer","format":"int32","default":1},"example":1},{"name":"size","in":"query","description":"Items per page (max 100)","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20},{"name":"sort","in":"query","description":"Sort order: 'date' (newest first, default) or 'views' (most viewed first)","required":false,"schema":{"type":"string","default":"date"},"example":"date"},{"name":"mine","in":"query","description":"When true, list the caller's own publications in any namespace instead of the public gallery (requires X-Owner-Token)","required":false,"schema":{"type":"boolean"}},{"name":"X-Owner-Token","in":"header","description":"Owner token; required when mine=true, which without it returns an empty page"}],"responses":{"200":{"description":"Paginated gallery items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryResponse"}}}}},"security":[{},{"OwnerToken":[]}]}},"/api/sites/{ns}/{id}/files/{filePath}":{"get":{"tags":["Sites"],"summary":"Serve site file","description":"Serves an individual file from the site with correct content type","operationId":"serveSiteFile","parameters":[{"name":"ns","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,32}$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Password","in":"header","description":"Access password via header","required":false,"schema":{"type":"string"}},{"name":"p","in":"query","description":"Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.","required":false,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Owner-Token","in":"header","description":"Owner token to bypass password protection when no password supplied","required":false,"schema":{"type":"string"}},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}},{"name":"filePath","in":"path","description":"Relative file path, including nested directories; encode each segment and retain slash separators.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File content","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Wrong password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Site or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Public publication deleted or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{},{"OwnerToken":[]},{"Password":[]}]}}},"components":{"schemas":{"PublicationResult":{"type":"object","description":"Publication outcome: code, action and optional reason. Action merged means an existing publication was returned instead of a new one.","properties":{"code":{"type":"string","enum":["success","duplicate","warned","failed"]},"action":{"type":"string","enum":["created","created_missing_assets","updated","merged","created_warned","unavailable","rate_limited","rejected"]},"reason":{"type":"string"},"extras":{"type":"object","additionalProperties":{}}},"required":["action","code"]},"SiteUpdateResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric site ID"},"namespace":{"type":"string"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access (info, update, delete)"},"entryFile":{"type":"string","description":"Entry HTML file resolved from the upload (e.g. index.html)"},"title":{"type":"string","description":"Entry page title: <title>, else first heading or text; absent if none."},"fileCount":{"type":"integer","format":"int32"},"totalSizeBytes":{"type":"integer","format":"int64"},"expiresAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"result":{"description":"Publication outcome: code + action + optional reason.","oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","entryFile","expiresAt","fileCount","hostingVersion","id","link","listed","managementLink","modeLocked","namespace","ownerLink","requestedDeliveryMode","routingCohort","tags","totalSizeBytes"]},"KvUpsertKeyRequest":{"type":"object","properties":{"value":{"type":"string","description":"New value for the key (max 1 MB)"}},"required":["value"]},"KvUpsertKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"key":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing of this key"},"ownerLink":{"type":"string","description":"API URL for programmatic access"},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"listed":{"type":"boolean","description":"Always false: KV is never listed in the gallery or sitemap."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","hostingVersion","id","key","link","listed","managementLink","modeLocked","namespace","ownerLink","requestedDeliveryMode","routingCohort","sizeBytes"]},"JsonUpdateResponse":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access"},"sizeBytes":{"type":"integer","format":"int64"},"updatedAt":{"type":"string","format":"date-time"},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"listed":{"type":"boolean","description":"Always false: JSON is never listed in the gallery or sitemap."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","hostingVersion","id","link","listed","managementLink","modeLocked","namespace","ownerLink","requestedDeliveryMode","routingCohort","sizeBytes","updatedAt"]},"HtmlUpdateRequest":{"type":"object","properties":{"content":{"type":"string","description":"New HTML content to replace existing page"},"format":{"type":["string","null"],"description":"Optional new content format on republish. Accepts 'html', 'markdown'/'md', or any code format (yaml, json, xml, csv, tsv, log, toml, ini, sql, sh, bat, env, javascript, typescript, tsx, jsx, css, properties, docker, txt). When omitted, the row's stored format is preserved. Takes precedence over the 'format' query param when both are present."}},"required":["content"]},"HtmlUpdateResponse":{"type":"object","description":"HTML update result. NEW publications include hosting metadata; OLD publications omit it.","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access"},"format":{"type":"string","description":"Stored format after auto-detect: html, markdown or a code format; may differ from the requested one. Absent when unknown."},"expiresAt":{"type":"string","format":"date-time"},"sizeBytes":{"type":"integer","format":"int64"},"result":{"description":"Publication outcome: code + action + optional reason.","oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"deliveryModeReason":{"type":"string","description":"Why the delivery mode changed or was flagged. 'policy:subdomain-required' -- the update turned a private-namespace page into HTML, so it moved to its own subdomain (link is the new address; the old link redirects). 'policy:republish-keeps-mode' -- X-Delivery-Mode was ignored; change the mode with the hosting operation. 'advisory:<codes>' -- the page stays on a BrewPage link but uses browser features that may not work fully there. Codes are comma-separated in a fixed order: storage, cookies, history, downloads, top-navigation, media-capture, pointer-lock, embeds, fullscreen. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["expiresAt","id","link","listed","namespace","ownerLink","sizeBytes"]},"FileUpdateResponse":{"type":"object","description":"Replace result. For an HTML file published as a page (notice 'html-file-as-page') the page was replaced","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"filename":{"type":"string","description":"Stored name of the new content"},"contentType":{"type":"string","description":"Detected MIME type of the new content"},"sizeBytes":{"type":"integer","format":"int64"},"link":{"type":"string"},"ownerLink":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","description":"Unchanged: updates keep the original expiry"},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["expiresAt","filename","id","link","listed","namespace","ownerLink","sizeBytes"]},"PasswordRequest":{"type":"object","properties":{"password":{"type":["string","null"],"description":"New reader password; null or blank removes it"}}},"PasswordResponse":{"type":"object","properties":{"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"listed":{"type":"boolean"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","listed"]},"VisibilityRequest":{"type":"object","properties":{"listed":{"type":"boolean","description":"false = hide from gallery & search, true = show. Link unchanged; omitted reports the state."}}},"VisibilityResponse":{"type":"object","properties":{"listed":{"type":"boolean"},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"link":{"type":"string"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","link","listed"]},"PublicationRotateResponse":{"type":"object","properties":{"type":{"type":"string"},"namespace":{"type":"string"},"id":{"type":"string"},"link":{"type":"string"},"ownerLink":{"type":"string"},"managementLink":{"type":"string","description":"Management page of the new id; null for classic links"},"manageUrl":{"type":"string","description":"New management link with its key, shown once; null when the row has none"},"listed":{"type":"boolean"},"notices":{"type":"array","description":"rotate-still-listed while the row is shown in gallery and search","items":{"$ref":"#/components/schemas/RotateNotice"}}},"required":["id","link","listed","namespace","notices","ownerLink","type"]},"RotateNotice":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ManageKeyResponse":{"type":"object","properties":{"manageUrl":{"type":"string","description":"Management link with its key, shown once"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["manageUrl"]},"ExtendResponse":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["expiresAt"]},"AccessRevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean"}}},"SiteUploadResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric site ID"},"namespace":{"type":"string"},"entryFile":{"type":"string","description":"Entry HTML file resolved from the upload (e.g. index.html)"},"title":{"type":"string","description":"Entry page title: <title>, else first heading or text; absent if none."},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access (info, delete)"},"fileCount":{"type":"integer","format":"int32"},"totalSizeBytes":{"type":"integer","format":"int64"},"expiresAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"ownerToken":{"type":"string","description":"Owner token: save it privately (cannot be recovered); send it as X-Owner-Token on later publishes and updates"},"result":{"description":"Publication outcome: code + action + optional reason. Present on every POST/PUT response.","oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"visibilityUrl":{"type":"string","description":"Owner: POST {\"listed\":false|true} here to hide or show. Link unchanged. Absent for a foreign duplicate."},"manageUrl":{"type":"string","description":"Private manage link, shown once. Absent: old publication or foreign duplicate."},"updated":{"type":"boolean","description":"Owner only: true if this upload replaced your stored site; else absent."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","entryFile","expiresAt","fileCount","hostingVersion","id","link","listed","managementLink","modeLocked","namespace","ownerLink","ownerToken","requestedDeliveryMode","routingCohort","tags","totalSizeBytes"]},"ReportRequest":{"type":"object","properties":{"reportedUrl":{"type":"string","description":"Full URL of the reported resource on brewpage.app or brewdata.app"},"category":{"type":"string","description":"Abuse category","enum":["cannot_delete","spam","phishing","malware","copyright","harassment","illegal","other"]},"description":{"type":"string","description":"Reporter description (10..5000 chars)"},"reporterEmail":{"type":["string","null"],"description":"Optional reporter email for follow-up"},"resourceNamespace":{"type":["string","null"],"description":"Optional namespace of the reported resource (e.g. 'public'). When supplied with resourceId takes priority over URL parsing."},"resourceId":{"type":["string","null"],"description":"Optional 10-character short ID of the reported resource. When supplied with resourceNamespace takes priority over URL parsing."}}},"ReportResponse":{"type":"object","properties":{"reportId":{"type":"string","description":"Unique 10-character alphanumeric report ID"},"receivedAt":{"type":"string","format":"date-time","description":"Server timestamp when the report was accepted"}}},"RevokeRequest":{"type":"object","properties":{"id":{"type":["string","null"]},"token":{"type":["string","null"]}}},"RevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]},"RevokeOthersRequest":{"type":"object","properties":{"keep":{"type":["array","null"],"description":"Token ids to keep; the header token is always kept","items":{"type":"string"}}}},"RevokeOthersResponse":{"type":"object","properties":{"revoked":{"type":"integer","format":"int32"}},"required":["revoked"]},"MintRequest":{"type":"object","properties":{"label":{"type":["string","null"]},"scope":{"type":["string","null"],"default":"publish","enum":["publish","admin"]},"expiresIn":{"type":["string","null"],"description":"Default: admin 90d, publish never","enum":["30d","90d","1y","never"]}}},"MintResponse":{"type":"object","properties":{"token":{"type":"string","description":"Shown once"},"id":{"type":"string","format":"uuid"},"scope":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","scope","token"]},"BindRequest":{"type":"object","properties":{"token":{"type":["string","null"],"description":"Owner token to add to the profile"}}},"BindResponse":{"type":"object","properties":{"bound":{"type":"boolean"},"id":{"type":"string","format":"uuid"},"active":{"type":"integer","format":"int32"},"max":{"type":"integer","format":"int32"}},"required":["active","bound","id","max"]},"KvCreateStoreRequest":{"type":"object","properties":{"key":{"type":"string","description":"Initial key name"},"value":{"type":"string","description":"Value for the initial key (max 1 MB)"}},"required":["key","value"]},"KvCreateStoreResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric store ID"},"namespace":{"type":"string"},"key":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing of the initial key"},"ownerLink":{"type":"string","description":"API URL for programmatic access (upsert/delete)"},"expiresAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"ownerToken":{"type":"string","description":"Owner token: save it privately (cannot be recovered); send it as X-Owner-Token on later publishes and updates"},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"manageUrl":{"type":"string","description":"Private, full control of this one store. Give it only to the owner; never publish it. Present only when minted."},"listed":{"type":"boolean","description":"Always false: KV is never listed in the gallery or sitemap."},"visibilityUrl":{"type":"string","description":"Owner: POST {\"listed\":false|true} here to hide or show. Link unchanged."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","expiresAt","hostingVersion","id","key","link","listed","managementLink","modeLocked","namespace","ownerLink","ownerToken","requestedDeliveryMode","routingCohort","sizeBytes","tags"]},"JsonCreateResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric document ID"},"namespace":{"type":"string"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access (update/delete)"},"sizeBytes":{"type":"integer","format":"int64"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"ownerToken":{"type":"string","description":"Owner token: save it privately (cannot be recovered); send it as X-Owner-Token on later publishes and updates"},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"manageUrl":{"type":"string","description":"Private, full control of this one document. Give it only to the owner; never publish it. Present only when minted."},"listed":{"type":"boolean","description":"Always false: JSON is never listed in the gallery or sitemap."},"visibilityUrl":{"type":"string","description":"Owner: POST {\"listed\":false|true} here to hide or show. Link unchanged."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","createdAt","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","expiresAt","hostingVersion","id","link","listed","managementLink","modeLocked","namespace","ownerLink","ownerToken","requestedDeliveryMode","routingCohort","sizeBytes","tags"]},"HtmlUploadRequest":{"type":"object","properties":{"content":{"type":"string","description":"HTML or markdown content to publish"},"filename":{"type":["string","null"],"description":"Optional original filename used as the tab title fallback and download basename. Trimmed; rejected if it contains path separators or control characters, length > 200, or bare name shorter than 4 chars"},"showTopBar":{"type":["boolean","null"],"description":"Per-content toggle for the frontend top toolbar. null = use global default (app.ui.show-top-bar-default)"},"format":{"type":["string","null"],"description":"Optional content format, same values as the 'format' query param. Takes precedence over the query param when both are present."}},"required":["content"]},"HtmlUploadResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric page ID"},"namespace":{"type":"string"},"link":{"type":"string","description":"Primary URL returned for browser viewing and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access (update/delete)"},"format":{"type":"string","description":"Stored format after auto-detect: html, markdown or a code format; may differ from the requested one. Absent when unknown."},"title":{"type":"string","description":"Stored title: <title>, else first heading or text; JSON: root title or name; code: filename or e.g. 'JS snippet'. Absent if none."},"expiresAt":{"type":"string","format":"date-time"},"sizeBytes":{"type":"integer","format":"int64"},"tags":{"type":"array","items":{"type":"string"}},"ownerToken":{"type":"string","description":"Owner token: save it privately (cannot be recovered); send it as X-Owner-Token on later publishes and updates"},"result":{"description":"Publication outcome: code + action + optional reason. Present on every POST/PUT response.","oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"deliveryModeReason":{"type":"string","description":"Why the delivery mode was chosen or flagged. 'policy:subdomain-required' -- a requested path mode was replaced by subdomain because HTML pages in a private namespace always get their own subdomain; mismatches are reported, not rejected. 'auto:<codes>' -- the page was published in subdomain mode automatically because it uses browser features a BrewPage link does not provide. 'advisory:<codes>' -- the mode was kept, but those features may not work fully on a BrewPage link. Codes are comma-separated in a fixed order: storage, cookies, history, downloads, top-navigation, media-capture, pointer-lock, embeds, fullscreen. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason, including how to change the delivery mode. Absent whenever deliveryModeReason is absent."},"manageUrl":{"type":"string","description":"Private, full control of this one publication. Give it only to the owner; never publish it. Present only when minted."},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"visibilityUrl":{"type":"string","description":"Owner: POST {\"listed\":false|true} here to hide or show. Link unchanged."},"updated":{"type":"boolean","description":"Owner only: true if this upload replaced your stored page; else absent."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","expiresAt","hostingVersion","id","link","listed","managementLink","modeLocked","namespace","ownerLink","ownerToken","requestedDeliveryMode","routingCohort","sizeBytes","tags"]},"FileUploadResponse":{"type":"object","description":"Upload result. For an HTML file published as a page (notice 'html-file-as-page') id, link and ownerLink belong to that page; manage it via /api/html","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric file ID, or the page ID when the HTML file was published as a page"},"namespace":{"type":"string"},"filename":{"type":"string","description":"Original filename as uploaded"},"contentType":{"type":"string","description":"Detected MIME type (e.g. image/png); text/html for an HTML file published as a page"},"sizeBytes":{"type":"integer","format":"int64","description":"Stored size in bytes; for a published page the page size (UTF-8 BOM removed)"},"link":{"type":"string","description":"Primary URL returned for browser download and sharing"},"ownerLink":{"type":"string","description":"API URL for programmatic access (delete); /api/html/{ns}/{id} for a published page"},"expiresAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"ownerToken":{"type":"string","description":"Owner token: save it privately (cannot be recovered); send it as X-Owner-Token on later publishes and updates. Absent when an existing publication of another owner was returned (result.extras.isOwner false)"},"result":{"description":"Present when an existing publication was returned: action merged, extras.isOwner says if ownerToken manages it","oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"visibilityNotice":{"type":"string","description":"Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add a hide hint), 'Public: anyone with the link. Not listed.' (public json, kv), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'"},"manageUrl":{"type":"string","description":"Private, full control of this one publication. Give it only to the owner; never publish it. Present only when minted."},"listed":{"type":"boolean","description":"true = listed in the gallery and sitemap now (public, no password, not hidden)."},"visibilityUrl":{"type":"string","description":"Owner: POST {\"listed\":false|true} here to hide or show. Link unchanged."},"updated":{"type":"boolean","description":"Owner only: true if this upload replaced your stored page; else absent."},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"notices":{"type":"array","description":"Advisories about the request or its result; omitted when none.","items":{"$ref":"#/components/schemas/PublishNotice"}}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","expiresAt","filename","hostingVersion","id","link","managementLink","modeLocked","namespace","ownerLink","requestedDeliveryMode","routingCohort","sizeBytes","tags"]},"HostingUpdateRequest":{"type":"object","properties":{"deliveryMode":{"type":"string","enum":["path","subdomain"]},"expectedVersion":{"type":"integer","format":"int64","maximum":9223372036854775807,"minimum":1}},"required":["deliveryMode"]},"HostingProjection":{"type":"object","properties":{"link":{"type":"string"},"ownerLink":{"type":"string"},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"namespace":{"type":"string"},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":"string","description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":"string","description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."}},"required":["access","deliveryMode","deliveryModeMatched","effectiveDeliveryMode","hostingVersion","link","managementLink","modeLocked","namespace","ownerLink","requestedDeliveryMode","routingCohort"]},"HostingReadResponse":{"type":"object","properties":{"link":{"type":"string"},"ownerLink":{"type":"string"},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"requestedDeliveryMode":{"type":["string","null"]},"effectiveDeliveryMode":{"type":["string","null"]},"deliveryModeMatched":{"type":["boolean","null"]},"namespace":{"type":"string"},"access":{"type":"string","description":"public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.","enum":["public","unlisted","protected"]},"modeLocked":{"type":"boolean"},"hostingVersion":{"type":["integer","null"],"format":"int64"},"deliveryModeReason":{"type":["string","null"],"description":"Why the request was served differently than asked: 'policy:subdomain-required', 'policy:mode-locked', 'policy:classic-link', 'policy:version-stale' or 'policy:republish-keeps-mode'. Mismatches are reported, not rejected. Absent when nothing applies."},"deliveryNotice":{"type":["string","null"],"description":"Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent."},"extendDays":{"type":["integer","null"],"format":"int32","description":"Days `POST …/extend` sets for this owner; null when Extend is not available (no profile, OLD publication)"},"readOnly":{"type":"boolean","description":"Old publication: edits refused; publish a new one."},"title":{"type":["string","null"],"description":"Display title; null for JSON and KV"},"listed":{"type":"boolean","description":"Shown in the gallery and search"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"fileCount":{"type":["integer","null"],"format":"int32","description":"Files in the site; sites only"},"format":{"type":["string","null"],"description":"Page format (html, markdown, code formats) or file MIME type; absent for sites, JSON and KV"}}},"OwnerCheckResponse":{"type":"object","properties":{"type":{"type":"string","description":"Resource type (html, kv, json, file, site)"},"format":{"type":"string","description":"Only for an `html`-type resource: `html` for an HTML page, `other` for any other stored format (Markdown, code or text). Absent for every other type","enum":["html","other"]},"isOwner":{"type":"boolean"}},"required":["isOwner","type"]},"StatsResponse":{"type":"object","properties":{"createdToday":{"type":"integer","format":"int64","description":"Resources created in the last 24 hours"},"totalCreated":{"type":"integer","format":"int64","description":"All-time resource count"},"viewsToday":{"type":"integer","format":"int64","description":"Views in the last 24 hours"},"totalViews":{"type":"integer","format":"int64","description":"All-time view count"},"breakdown":{"type":"array","description":"Per-type breakdown (html, json, kv, file, site)","items":{"$ref":"#/components/schemas/TypeBreakdown"}},"createdTodayPublic":{"type":["integer","null"],"format":"int64","description":"Resources created today in the public namespace"},"createdTodayPrivate":{"type":["integer","null"],"format":"int64","description":"Resources created today in private namespaces"},"viewsTodayPublic":{"type":["integer","null"],"format":"int64","description":"Views today on resources in the public namespace"},"viewsTodayPrivate":{"type":["integer","null"],"format":"int64","description":"Views today on resources in private namespaces"},"totalCreatedPublic":{"type":["integer","null"],"format":"int64","description":"All-time resources created in the public namespace"},"totalCreatedPrivate":{"type":["integer","null"],"format":"int64","description":"All-time resources created in private namespaces"},"totalViewsPublic":{"type":["integer","null"],"format":"int64","description":"All-time views on resources in the public namespace"},"totalViewsPrivate":{"type":["integer","null"],"format":"int64","description":"All-time views on resources in private namespaces"},"deletedToday":{"type":["integer","null"],"format":"int64","description":"Resources deleted in the last 24 hours"},"deletedTodayPublic":{"type":["integer","null"],"format":"int64","description":"Resources deleted today in the public namespace"},"deletedTodayPrivate":{"type":["integer","null"],"format":"int64","description":"Resources deleted today in private namespaces"},"totalDeleted":{"type":["integer","null"],"format":"int64","description":"All-time deleted resource count"},"totalDeletedPublic":{"type":["integer","null"],"format":"int64","description":"All-time deleted resources in the public namespace"},"totalDeletedPrivate":{"type":["integer","null"],"format":"int64","description":"All-time deleted resources in private namespaces"},"accountsToday":{"type":["integer","null"],"format":"int64","description":"Accounts created today"},"totalAccounts":{"type":["integer","null"],"format":"int64","description":"All-time account count"}}},"TypeBreakdown":{"type":"object","properties":{"type":{"type":"string","description":"Resource type: html, json, kv, file, or site"},"today":{"type":"integer","format":"int64","description":"Created in the last 24 hours"},"total":{"type":"integer","format":"int64","description":"All-time count"},"todayPublic":{"type":["integer","null"],"format":"int64","description":"Created today in the public namespace"},"todayPrivate":{"type":["integer","null"],"format":"int64","description":"Created today in private namespaces"},"totalPublic":{"type":["integer","null"],"format":"int64","description":"All-time count in the public namespace"},"totalPrivate":{"type":["integer","null"],"format":"int64","description":"All-time count in private namespaces"},"todayDeleted":{"type":["integer","null"],"format":"int64","description":"Deleted in the last 24 hours"},"todayDeletedPublic":{"type":["integer","null"],"format":"int64","description":"Deleted today in the public namespace"},"todayDeletedPrivate":{"type":["integer","null"],"format":"int64","description":"Deleted today in private namespaces"},"totalDeleted":{"type":["integer","null"],"format":"int64","description":"All-time deleted count"},"totalDeletedPublic":{"type":["integer","null"],"format":"int64","description":"All-time deleted in the public namespace"},"totalDeletedPrivate":{"type":["integer","null"],"format":"int64","description":"All-time deleted in private namespaces"}}},"SiteFileInfo":{"type":"object","properties":{"path":{"type":"string","description":"Relative file path within the site"},"contentType":{"type":"string","description":"Detected MIME type"},"sizeBytes":{"type":"integer","format":"int64"}},"required":["path","sizeBytes"]},"SiteInfoResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric site ID"},"namespace":{"type":"string"},"entryFile":{"type":"string","description":"Entry HTML file resolved from the upload"},"fileCount":{"type":"integer","format":"int32"},"totalSizeBytes":{"type":"integer","format":"int64"},"files":{"type":"array","description":"List of all files in the site","items":{"$ref":"#/components/schemas/SiteFileInfo"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"views":{"type":"integer","format":"int64"},"tags":{"type":"array","items":{"type":"string"}}},"required":["createdAt","entryFile","expiresAt","fileCount","files","id","namespace","tags","totalSizeBytes","views"]},"PublicationListItemResponse":{"type":"object","properties":{"type":{"type":"string"},"namespace":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"format":{"type":"string","description":"Page content format (html, markdown, code formats) or file MIME type; absent for sites, JSON and KV"},"link":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"views":{"type":"integer","format":"int64"},"status":{"type":"string","description":"public, hidden, private, password or unavailable"},"listed":{"type":"boolean"},"extendDays":{"type":"integer","format":"int32","description":"Days `POST …/extend` sets; null when not offered"},"readOnly":{"type":"boolean","description":"Old publication: edits refused; publish a new one."},"preview":{"oneOf":[{"$ref":"#/components/schemas/PublicationPreviewResponse"}]},"claimed":{"type":"boolean","description":"Added by management link"}},"required":["claimed","createdAt","expiresAt","id","listed","namespace","readOnly","status","type","views"]},"PublicationListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicationListItemResponse"}},"nextCursor":{"type":"string","description":"Pass as `cursor` for the next page; null on the last page"},"total":{"type":"integer","format":"int64"}},"required":["items","total"]},"PublicationPreviewResponse":{"type":"object","description":"WebP previews: thumbD 800x373, thumbM 320x149, full: page top (pages, sites) or the 1200 px card","properties":{"thumbD":{"type":"string"},"thumbM":{"type":"string"},"full":{"type":"string"},"branded":{"type":"boolean","description":"true = type card, not a page or content render; absent when false"}},"required":["thumbD","thumbM"]},"PublicationStatsReport":{"type":"object","properties":{"range":{"type":"integer","format":"int32"},"from":{"type":"string","format":"date"},"through":{"type":"string","format":"date"},"updatedAt":{"type":["string","null"],"format":"date-time"},"todayPartial":{"type":"boolean"},"views":{"type":"integer","format":"int64"},"days":{"type":"array","items":{"$ref":"#/components/schemas/StatsDay"}},"totals":{"$ref":"#/components/schemas/StatsTotals"},"hours":{"type":["array","null"],"items":{"type":"integer","format":"int32"}},"devices":{"$ref":"#/components/schemas/StatsDevices"},"previews":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}},"countries":{"type":["array","null"],"items":{"$ref":"#/components/schemas/StatsCountry"}},"refHosts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/StatsHost"}},"geoAttribution":{"type":"string"}}},"StatsCountry":{"type":"object","properties":{"cc":{"type":"string"},"n":{"type":"integer","format":"int32"}}},"StatsDay":{"type":"object","properties":{"d":{"type":"string","format":"date"},"humans":{"type":"integer","format":"int32"},"automated":{"type":"integer","format":"int32"},"visitors":{"type":"integer","format":"int32"}}},"StatsDevices":{"type":"object","properties":{"mobile":{"type":"integer","format":"int32"},"tablet":{"type":"integer","format":"int32"},"desktop":{"type":"integer","format":"int32"}}},"StatsHost":{"type":"object","properties":{"host":{"type":"string"},"n":{"type":"integer","format":"int32"}}},"StatsTotals":{"type":"object","properties":{"humans":{"type":"integer","format":"int32"},"automated":{"type":"integer","format":"int32"}}},"OwnerTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"ownerId":{"type":"string"}}},"RandomNamespaceResponse":{"type":"object","properties":{"namespace":{"type":"string"}}},"FileLimitsResponse":{"type":"object","description":"File upload; maxFiles per namespace","properties":{"maxFileBytes":{"type":"integer","format":"int64"},"maxVideoBytes":{"type":"integer","format":"int64"},"maxAudioBytes":{"type":"integer","format":"int64"},"maxFiles":{"type":"integer","format":"int32"},"defaultTtlDays":{"type":"integer","format":"int32"},"maxTtlDays":{"type":"integer","format":"int32"}},"required":["defaultTtlDays","maxAudioBytes","maxFileBytes","maxFiles","maxTtlDays","maxVideoBytes"]},"HtmlLimitsResponse":{"type":"object","description":"HTML, Markdown, code or JSON page (`POST /api/html`); maxBytes counts UTF-8 bytes","properties":{"maxBytes":{"type":"integer","format":"int64"},"defaultTtlDays":{"type":"integer","format":"int32"},"maxTtlDays":{"type":"integer","format":"int32"}},"required":["defaultTtlDays","maxBytes","maxTtlDays"]},"JsonLimitsResponse":{"type":"object","description":"JSON document; maxDocs per namespace","properties":{"maxBytes":{"type":"integer","format":"int64"},"maxDocs":{"type":"integer","format":"int32"},"defaultTtlDays":{"type":"integer","format":"int32"},"maxTtlDays":{"type":"integer","format":"int32"}},"required":["defaultTtlDays","maxBytes","maxDocs","maxTtlDays"]},"KvLimitsResponse":{"type":"object","description":"KV store; maxKeys per store","properties":{"maxValueBytes":{"type":"integer","format":"int64"},"maxKeys":{"type":"integer","format":"int32"},"defaultTtlDays":{"type":"integer","format":"int32"},"maxTtlDays":{"type":"integer","format":"int32"}},"required":["defaultTtlDays","maxKeys","maxTtlDays","maxValueBytes"]},"LimitsResponse":{"type":"object","properties":{"requestMaxBytes":{"type":"integer","format":"int64"},"sites":{"$ref":"#/components/schemas/SiteLimitsResponse"},"html":{"$ref":"#/components/schemas/HtmlLimitsResponse"},"json":{"$ref":"#/components/schemas/JsonLimitsResponse"},"kv":{"$ref":"#/components/schemas/KvLimitsResponse"},"files":{"$ref":"#/components/schemas/FileLimitsResponse"},"profileMaxTtlDays":{"type":"integer","format":"int32","description":"TTL cap in days for an X-Owner-Token in a profile, every type"},"reach":{"type":"string","description":"`profile` only for an X-Owner-Token active in a profile; else `token`, also without a token","enum":["token","profile"]},"ownerMaxTtlDays":{"type":"integer","format":"int32","description":"Per-owner TTL cap in days for this token; absent = per-type maximum"}},"required":["files","html","json","kv","profileMaxTtlDays","reach","requestMaxBytes","sites"]},"SiteLimitsResponse":{"type":"object","properties":{"maxFiles":{"type":"integer","format":"int32"},"maxFileBytes":{"type":"integer","format":"int64"},"maxTotalBytes":{"type":"integer","format":"int64"},"maxArchiveExpansionBytes":{"type":"integer","format":"int64"},"maxPathChars":{"type":"integer","format":"int32"},"maxPathBytes":{"type":"integer","format":"int32"},"maxNameBytes":{"type":"integer","format":"int32"},"defaultTtlDays":{"type":"integer","format":"int32"},"maxTtlDays":{"type":"integer","format":"int32"},"allowedExtensions":{"type":"array","items":{"type":"string"}},"skippedFileNames":{"type":"array","items":{"type":"string"}},"skippedRootFolders":{"type":"array","items":{"type":"string"}}},"required":["allowedExtensions","defaultTtlDays","maxArchiveExpansionBytes","maxFileBytes","maxFiles","maxNameBytes","maxPathBytes","maxPathChars","maxTotalBytes","maxTtlDays","skippedFileNames","skippedRootFolders"]},"KvStoreListResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric store ID"},"keyCount":{"type":"integer","format":"int32","description":"Number of keys in the store"},"createdAt":{"type":"string","format":"date-time","description":"When the first key in the store was created"}},"required":["createdAt","id","keyCount"]},"KvListKeysResponse":{"type":"object","properties":{"keys":{"type":"array","description":"All key names in the store","items":{"type":"string"}},"count":{"type":"integer","format":"int32","description":"Total number of keys"},"expiresAt":{"type":"string","format":"date-time","description":"When the store expires"},"views":{"type":"integer","format":"int64","description":"Aggregated views across all keys in this store"}},"required":["count","expiresAt","keys","views"]},"KvGetResponse":{"type":"object","properties":{"value":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","description":"When the value was last written or updated"},"expiresAt":{"type":"string","format":"date-time","description":"When the value expires"},"views":{"type":"integer","format":"int64","description":"Total number of reads for this key (post-increment)"}},"required":["expiresAt","updatedAt","value","views"]},"JsonListResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric document ID"},"content":{"type":"string"},"size":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}},"required":["content","createdAt","id","size"]},"HostOwnerCheckResponse":{"type":"object","properties":{"type":{"type":"string","description":"Resource type (html, kv, json, file, site); owners only"},"namespace":{"type":"string","description":"Publication namespace; owners only"},"id":{"type":"string","description":"Publication id; owners only"},"isOwner":{"type":"boolean"}},"required":["isOwner"]},"GalleryItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","description":"Publication type: a page's stored format ('html', 'markdown' or a code format such as 'json', 'yaml', 'txt'), 'file', or 'site'"},"title":{"type":"string","description":"Display title derived from content or filename"},"createdAt":{"type":"string","format":"date-time"},"views":{"type":"integer","format":"int64","description":"Total view count"},"visibility":{"type":["string","null"],"description":"Per-item visibility classification — public on default responses; my_public/my_public_password/my_private on mine=true","enum":["public","my_public","my_public_password","my_private"]},"namespace":{"type":["string","null"],"description":"Namespace the item lives in — 'public' on default responses; mine=true returns the real namespace (e.g. 'public', 'secret-ns') so the frontend can build correct /{ns}/{id} links"},"listed":{"type":["boolean","null"],"description":"mine=true only: false for private, password or hidden items (Hidden = public + false)"},"link":{"type":["string","null"]},"managementLink":{"type":["string","null"]},"routingCohort":{"type":"string"},"deliveryMode":{"type":["string","null"]},"hostingVersion":{"type":["integer","null"],"format":"int64"},"expiresAt":{"type":["string","null"],"format":"date-time","description":"mine=true only: when the publication expires"},"preview":{"description":"WebP previews; null while previews are off and on password rows","oneOf":[{"$ref":"#/components/schemas/PublicationPreviewResponse"},{"type":"null"}]},"format":{"type":["string","null"],"description":"type=file: lowercase extension, else null"}}},"GalleryResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GalleryItem"}},"total":{"type":"integer","format":"int64","description":"Total number of matching items across all pages"},"page":{"type":"integer","format":"int32","description":"Current page number (1-based)"},"size":{"type":"integer","format":"int32","description":"Items per page"},"scope":{"type":["string","null"],"description":"mine=true only: `profile` when the token is active in a profile (its rows are listed), else `token`","enum":["token","profile"]}}},"FileListResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique 10-character alphanumeric file ID"},"filename":{"type":"string","description":"Original filename as uploaded"},"contentType":{"type":"string","description":"Detected MIME type (e.g. image/png)"},"size":{"type":"integer","format":"int64"},"link":{"type":"string","description":"Public short URL for browser download"},"createdAt":{"type":"string","format":"date-time"}},"required":["createdAt","filename","id","link","size"]},"ErrorResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"error":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"supportedTypes":{"type":"array","items":{"type":"string"}},"retryAfterSeconds":{"type":"integer","format":"int64","description":"Seconds to wait; same as Retry-After"},"limit":{"type":"integer","format":"int32"},"result":{"oneOf":[{"$ref":"#/components/schemas/PublicationResult"}]},"code":{"type":"string","description":"Machine-readable reason, e.g. OWNER_AUTHORIZATION_FAILED, OWNER_TOKEN_REVOKED, OWNER_TOKEN_EXPIRED, ADMIN_TOKEN_REQUIRED, OLD_PUBLICATION_READ_ONLY, WRONG_RESOURCE_TYPE, PUBLICATION_UNAVAILABLE, ROTATE_LIMITED."},"republishUrl":{"type":"string","description":"With OLD_PUBLICATION_READ_ONLY on an HTML page: browser composer to publish it anew."},"createUrl":{"type":"string","description":"With OLD_PUBLICATION_READ_ONLY or a write 404: create endpoint (same namespace); POST the content there to publish it anew."},"resourceUrl":{"type":"string","description":"With WRONG_RESOURCE_TYPE: API URL of this id's real type; repeat the write there."},"accountUrl":{"type":"string","description":"Write 429 without an account: free account with higher limits"}},"required":["error","message","status","timestamp"]},"PublishNotice":{"type":"object","properties":{"code":{"type":"string","description":"Kebab-case, e.g. ttl-clamped, namespace-defaulted, secret-detected, visibility-not-listable, extend-needs-profile, rotate-still-listed, owner-token-new (save the new ownerToken, reuse it), credential-published (token or manage link in public content: remove it, reset it), archive-unverified (archive: check contents before opening)."},"message":{"type":"string"}},"required":["code","message"]}},"securitySchemes":{"OwnerToken":{"type":"apiKey","name":"X-Owner-Token","in":"header"},"Password":{"type":"apiKey","name":"X-Password","in":"header"},"ManageKey":{"type":"apiKey","description":"Key from manageUrl (#k=…): private, full control of one publication.","name":"X-Manage-Key","in":"header"}}}}