---
title: "Update HTML page"
method: PUT
path: "/api/html/{ns}/{id}"
tags: ["HTML"]
---

# Update HTML page

`PUT /api/html/{ns}/{id}`

Replaces page content; requires the owner token returned at creation. Also accepts raw text/* (HTML, Markdown, YAML, XML, CSV, code) bodies — see /llms-full.txt.

## Path parameters

- `ns` string, required
- `id` string, required

## Query parameters

- `format` string

## Headers

- `X-Owner-Token` string, required
- `User-Agent` string

## Request body

- HtmlUpdateRequest
  - `content` string — New HTML content to replace existing page
  - `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. Takes precedence over the 'format' query param when both are present.

## Response `200`

Page updated

## Other responses

- `403` — Missing or wrong owner token
- `404` — Page not found or expired

---

[API](https://skmtc.net/brewpage/apis/brewpage-api.md) · [All operations](https://skmtc.net/brewpage/apis/brewpage-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brewpage/brewpage-api/revisions/6e0ac03e39e5/schema)
