republish_site
Replace an existing BrewPage site's complete file set at the same URL, preserving its expiry. Pass single-page HTML or multi-file paths with the owner token.
Instructions
Republish (full-replace) an existing multi-file BrewPage site in place at the SAME URL/ID. Requires owner token. The uploaded bundle becomes the complete new file set — files absent from it are removed, new files added, matching files overwritten. Single-page: pass entryContent. Multi-page: pass files (array of {path, content}). Optional entry overrides the default index.html. Republishing preserves existing expiry. Limits (call get_limits for current values): a request is at most 25 MB; a site at most 200 files, 5 MB per file and 20 MB in total; each path at most 380 characters. System files (.DS_Store, __MACOSX/ and similar) are skipped and never count; files with an unsupported extension or a too-long path are skipped and listed in notices. Entry: entry, else root index.html, else the shallowest HTML file. Errors: 400 = a site limit exceeded (the message names it and what to do), invalid path or no HTML file; 413 = request over 25 MB, too many files and form fields, or a file name/path too long; 422 = no servable file left.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Site ID | |
| tags | No | Optional tags (replaces the site's existing tags) | |
| entry | No | Entry file path, default index.html | |
| files | No | Multi-file site: array of `{path, content}`. Mutually exclusive with `entryContent`. | |
| ttlDays | No | Ignored: republishing keeps the existing expiry; a supplied value comes back as a ttl-ignored notice. | |
| namespace | Yes | Site namespace | |
| ownerToken | Yes | Owner token received when the site was created (required for republish) | |
| entryContent | No | HTML content for a single-page site (entry file). Mutually exclusive with `files`. |