Replace file
Changed onReplaces the file content (multipart 'file'); same type rules and limits as upload. Keeps link, password, TTL and tags. For an HTML or Markdown file published as a page, replaces that page (same rules as PUT /api/html). HTML or Markdown over an existing file makes it a page at the same address, keeping owner, password, TTL, tags and views.
Request
- Base URLhttps://brewpage.app
- Auth
- API key in header X-Owner-Token
- or API key in header X-Manage-Key
Path parameters
Query parameters
Not part of the update contract: updates keep the original expiry.
Format of a page published from this file: decides over the file name. Unknown values are ignored.
Headers
Owner token returned at creation
Management key of this publication
Request body multipart/form-data
File part; any single file part is accepted when 'file' is absent
Response
File replaced
Replace result. For a file published as a page (notice 'html-file-as-page', 'markdown-file-as-page' or 'file-format-applied') the page was replaced
Stored name of the new content
Detected MIME type of the new content
Unchanged: updates keep the original expiry
true = listed in the gallery and sitemap now (public, no password, not hidden).
false = never listed in the gallery whatever the namespace (JSON and KV, JSON pages, HTML and JSON files); listing does not apply
Advisories about the request or its result; omitted when none.
Changes
- info
added the optional property
levelto the response with the status - info
added the optional property
levelto the response with the status - info
added the optional property
levelto the response with the status
4 more changes in this revision
- info