HTML

Create HTML page

Changed on

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.

post/api/html

Request

  • Base URL: https://brewpage.app
  • URL: https://brewpage.app/api/html
  • Auth: one of:
    • none
    • API key in header X-Owner-Token

Query parameters

nsstring

Namespace (default public). Custom namespaces are unlisted, accessible to anyone with the URL. Public discovery additionally requires eligibility and no password.

tagsstring

Comma-separated tags

ttlstring

TTL in integer days (1-30); accepts 15, 15d, 15 day or 15 days, case-insensitive. Omitted or blank uses 15 days.

formatstring

Content format. 'html' (default) — stored verbatim. '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/xml, text/plain) plus X-Content-Type-Options: nosniff: yaml, json, xml, csv, tsv, log, toml, ini, sql, sh, bat, env, javascript, typescript, tsx, jsx, css, properties, docker, txt

Headers

X-Passwordstring

Access password. Empty means no password restriction; public discovery additionally requires eligibility. Protected pages are hidden from the gallery. OLD links accept ?p=; NEW access uses X-Password or a reader access cookie after password entry.

X-Owner-Tokenstring

Reuse existing owner token to group entities under one owner. If omitted, a new token is generated

User-Agentstring
X-Delivery-Mode'path' | 'subdomain'

NEW delivery preference: path or subdomain. Non-public namespaces require subdomain; omission allows smart selection.

Request body

contentstring required

HTML or markdown content to publish

filenamestring nullable

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

showTopBarboolean nullable

Per-content toggle for the frontend top toolbar. null = use global default (app.ui.show-top-bar-default)

Response

Page created

idstring required

Unique 10-character alphanumeric page ID

namespacestring required
linkstring required

Primary URL returned for browser viewing and sharing

ownerLinkstring required

API URL for programmatic access (update/delete)

expiresAtstring date-time required
sizeBytesinteger required
tagsstring[] required
ownerTokenstring required

Secret token required for update and delete operations. Store it safely -- cannot be recovered

visibilityNoticestring

Human-readable explanation of link access and conditional public-discovery eligibility. Unlisted links are not secret; password protection applies when configured. No guarantee of listing, ranking or search-engine indexing.

deliveryModeReasonstring

Why the delivery mode was chosen or flagged. '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.

deliveryNoticestring

Human-readable explanation of deliveryModeReason, including how to change the delivery mode. Absent whenever deliveryModeReason is absent.

managementLinkstring nullable required
routingCohortstring required
deliveryModestring nullable required
requestedDeliveryModestring nullable required
effectiveDeliveryModestring nullable required
deliveryModeMatchedboolean nullable required
accessstring required
modeLockedboolean required
hostingVersioninteger nullable required

Changes

    • breaking

      added the pattern ^\s*(?:\d+\s*(?:[dD]|[dD][aA][yY][sS]?)?)?\s*$ to the query request parameter ttl

    • breaking

      the request property became required

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • info

      api operation id create_2 removed and replaced with create_1

    • info

      the endpoint scheme security OwnerToken was added to the API

    • info

      added the new optional header request parameter X-Delivery-Mode

    • info

      added the media type application/javascript to the request body

    • info

      added the media type application/octet-stream to the request body

    • info

      added the media type application/toml to the request body

    • info

      added the media type application/x-yaml to the request body

    • info

      added the media type application/xml to the request body

    • info

      added the media type application/yaml to the request body

    • info

      added the media type text/css to the request body

    • info

      added the media type text/csv to the request body

    • info

      added the media type text/html to the request body

    • info

      added the media type text/javascript to the request body

    • info

      added the media type text/markdown to the request body

    • info

      added the media type text/plain to the request body

    • info

      added the media type text/x-toml to the request body

    • info

      added the media type text/xml to the request body

    • info

      added the media type text/yaml to the request body

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      added subschema #2 to the response property oneOf list for the response status

    • breaking

      added subschema #2 to the response property oneOf list for the response status

    • breaking

      added subschema #2 to the response property oneOf list for the response status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      the request property became nullable

    • info

      the request property became nullable