Update page
update_htmlUpdates an existing BrewPage page's HTML, Markdown, code, or JSON content using an owner token and returns the updated page metadata.
Instructions
Update an existing BrewPage HTML, Markdown, code or JSON page. Requires owner token. Returns the updated page metadata. Format omitted keeps the stored format, except a whole HTML document makes a Markdown page an HTML page. The link and delivery mode never change on update; an advisory deliveryModeReason and delivery notice are included when the new content uses browser features that may not work fully on a BrewPage link. Old publications (made before 5 October 2026) are read-only: 409 OLD_PUBLICATION_READ_ONLY with createUrl to publish anew. BrewPage tokens and manage links must never be in public content. Page code must not hide or alter the BrewPage badge; a profile can turn the badge off for a page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"namespace": "<namespace>",
"id": "<id>",
"content": "<content>"
},
"name": "update_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Page ID | |
| tags | No | Optional tags; replace the page's stored tags ([] clears). Omit to keep them. | |
| state | No | Page data config, same shape as on create. Lists named here are added or updated, the others stay; a stored list keeps its `mode` and `write` when the call omits them. Omitted: the stored config stays; `null` turns page data off (saved entries are kept). | |
| format | No | Content format. Accepts (case-insensitive on html/markdown): 'html', 'markdown'/'md', or a code language — yaml, json, xml, csv, tsv, log, toml, ini, sql, sh, bat, env, javascript, typescript, tsx, jsx, css, properties, docker, txt. Omit to preserve the stored format, except a whole HTML document makes a Markdown page an HTML page. | |
| content | Yes | New HTML, Markdown, code or JSON content | |
| namespace | Yes | Page namespace | |
| ownerToken | No | Owner token from create. Default: env BREWPAGE_OWNER_TOKEN (local server only). |