HTML

Update HTML page

Changed on

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.

put/api/html/{ns}/{id}

Request

  • Base URL
    https://brewpage.app
  • Auth
    • API key in header X-Owner-Token
    • or API key in header X-Manage-Key

Path parameters

ns, string required
id, string required

Query parameters

format, string

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, except that a whole HTML document makes a Markdown page an HTML page. Body field 'format' on HtmlUpdateRequest takes precedence over the query param when both are present.

tags, string

Comma-separated tags; replace the stored tags (empty clears). Omit to keep them

verbatim, boolean

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.

Headers

User-Agent, string
X-Owner-Token, unknown

Owner token returned at creation

X-Manage-Key, unknown

Management key of this publication

Request body

union required
object required
OR
object required

Response

Page updated

HtmlUpdateResponse required

HTML update result. NEW publications include hosting metadata; OLD publications omit it.

id, string required
namespace, string required
link, string required

Primary URL returned for browser viewing and sharing

ownerLink, string required

API URL for programmatic access

format, string

Stored format after auto-detect: html, markdown or a code format; may differ from the requested one. Absent when unknown.

expiresAt, string date-time required
sizeBytes, integer required
result, PublicationResult

Publication outcome: code, action and optional reason. Action merged means an existing publication was returned instead of a new one.

visibilityNotice, string

Link access in words, e.g. 'Public: listed in the gallery and sitemap; search engines can index it.' (public html, site and file add an unlist hint), 'Public: anyone with the link. Not listed.' (public json, kv, json pages, json and html files), 'Private: not listed. Only via your unique private link.' or 'Password: link + password.'

deliveryModeReason, string

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, string

Human-readable explanation of deliveryModeReason. Absent whenever deliveryModeReason is absent.

listed, boolean required

true = listed in the gallery and sitemap now (public, no password, not hidden).

listable, boolean required

false = never listed in the gallery whatever the namespace (JSON and KV, JSON pages, HTML and JSON files); listing does not apply

managementLink, string nullable
routingCohort, string
deliveryMode, string nullable
requestedDeliveryMode, string nullable
effectiveDeliveryMode, string nullable
deliveryModeMatched, boolean nullable
access, 'public' | 'unlisted' | 'protected'

public: html, site and file listed in gallery and sitemap. unlisted: private, not listed. protected: link + password.

modeLocked, boolean
hostingVersion, integer nullable
linkName, string nullable

Link name of this public page, site or file; null = its random link. Absent when link names are not available.

notices, PublishNotice[]

Advisories about the request or its result; omitted when none.

Changes

    • info

      added the new optional request property lambda

    • info

      added subschema #1 subschema #2 to the request body anyOf list

    • info

      the request property content became optional

    3 more changes in this revision