# Websites

Sites, pages, templates, data sources, builds, deployments and experiments.

Scopes for this area: `hosting:read`, `hosting:write` and `hosting:admin`.

163 operations.

## data source

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/datasources` | The databases linked to this project, read-only. | read | `rivier hosting data source list` |
| GET | `/datasources/{id}` | One link with its last snapshot (names, types, row estimates; never rows). | read | `rivier hosting data source get` |
| POST | `/datasources` | Link a Furcate database by id; the database service checks the read role was made for this project. | write | `rivier hosting data source link` |
| POST | `/datasources/{id}/refresh` | Take a fresh snapshot and check the link is still reachable. | write | `rivier hosting data source refresh` |
| DELETE | `/datasources/{id}` | Remove a link; nothing stays readable. | write | `rivier hosting data source unlink` |
| PUT | `/datasources/{id}/allow` | Choose the tables the project may read (only tables the operator granted). | write | `rivier hosting data source allow` |
| PUT | `/datasources/{id}/write-rules` | Per-table write rules; nothing writes without one and an approval. | write | `rivier hosting data source write rules` |
| POST | `/datasources/{id}/read` | A plan by default; with execute, up to 500 masked rows of one allowed table. | write | `rivier hosting data source read` |
| GET | `/datasources/{id}/mappings` | Proposed mappings of tables to contacts, products, orders and content. | read | `rivier hosting data source mappings` |
| POST | `/datasources/{id}/mappings/{mid}` | Accept or reject a proposed mapping. | write | `rivier hosting data source decide mapping` |
| POST | `/datasources/{id}/ingest` | Copy up to 100 rows of an allowed table into memory, on purpose. | write | `rivier hosting data source ingest` |

## usage

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/usage` | What the plan allows this project's hosting and what is in use. | read | `rivier hosting usage get` |

## site

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites` | The sites this project hosts. | read | `rivier hosting site list` |
| POST | `/hosting/sites` | Create a site with a generated address under the platform domain. | write | `rivier hosting site create` |
| GET | `/hosting/sites/{id}` | One site. | read | `rivier hosting site get` |
| DELETE | `/hosting/sites/{id}` | Remove the site, its previews, its domains and its settings. | admin | `rivier hosting site remove` |
| POST | `/hosting/sites/{id}/resume` | After resubscribing: make a site that is kept read-only writable again. | write | `rivier hosting site resume` |
| POST | `/hosting/sites/{id}/unpublish` | Take the site offline (a production release with an offline page). Publishing again or rolling back brings it back. A person only. | write | `rivier hosting site unpublish` |
| POST | `/hosting/sites/{id}/publish` | Publish a preview, or ask for a production release (checks must pass; a person approves). A person can pass approve to do both at once. | write | `rivier hosting site publish` |

## deployment

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/deployments` | Deployments of a site, newest first. | read | `rivier hosting deployment list` |
| POST | `/hosting/sites/{id}/deployments` | Deploy the site from the request body: a gzip tar with index.html at its top. ?preview=1 makes a preview at its own address. | write | `rivier hosting deployment create` |
| GET | `/hosting/sites/{id}/deployments/{dep}` | One deployment. | read | `rivier hosting deployment get` |
| POST | `/hosting/sites/{id}/deployments/{dep}/promote` | Make a preview the production site. | write | `rivier hosting deployment promote` |
| POST | `/hosting/sites/{id}/deployments/{dep}/rollback` | Serve an earlier production deployment again. | write | `rivier hosting deployment rollback` |
| DELETE | `/hosting/sites/{id}/deployments/{dep}` | Delete a preview deployment. | admin | `rivier hosting deployment remove` |

## env

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/env` | The names of the variables set on a site. Values are never returned. | read | `rivier hosting env list` |
| PUT | `/hosting/sites/{id}/env` | Set a variable on a Next site. The value is sealed and delivered to the running site only. | write | `rivier hosting env set` |
| DELETE | `/hosting/sites/{id}/env/{name}` | Remove a variable. | admin | `rivier hosting env remove` |

## domain

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/domains` | Custom domains of a site with their state, the reason in plain words and the one thing to do next. | read | `rivier hosting domain list` |
| GET | `/hosting/sites/{id}/domains/options` | The ways to connect a name, best first (buy it, let Rivier run the DNS, connect a DNS account, one click at the registrar, add the records yourself), each with exact steps and records. | read | `rivier hosting domain options` |
| POST | `/hosting/sites/{id}/domains` | Connect a name. Control is proven by the name pointing at the site; the certificate is obtained before the first visitor. | write | `rivier hosting domain add` |
| POST | `/hosting/sites/{id}/domains/quote` | Price a name to buy through Rivier. Nothing is bought. | read | `rivier hosting domain quote` |
| POST | `/hosting/sites/{id}/domains/buy` | Buy the quoted name (a person only) and connect it. | write | `rivier hosting domain buy` |
| POST | `/hosting/sites/{id}/domains/{dom}/renew/quote` | The price to renew a name bought through Rivier for a year. Nothing is charged. | read | `rivier hosting domain renew quote` |
| POST | `/hosting/sites/{id}/domains/renew` | Renew the quoted name (a person only). | write | `rivier hosting domain renew` |
| PATCH | `/hosting/sites/{id}/domains/{dom}` | Change which form of a name is the address people see (www or apex), or whether a delegated name serves its subdomains. | write | `rivier hosting domain update` |
| POST | `/hosting/sites/{id}/domains/{dom}/check` | Look at the name now and move it along. | write | `rivier hosting domain check` |
| DELETE | `/hosting/sites/{id}/domains/{dom}` | Stop serving the site on a name and delete the DNS records Rivier wrote for it. | admin | `rivier hosting domain remove` |

## event

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/events` | The site's record: deploys, domain and variable changes, health checks. | read | `rivier hosting event list` |

## log

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/logs` | Recent runtime log lines of a Next site. | read | `rivier hosting log list` |

## health

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/health` | Fetch the site now and report whether it answers. | read | `rivier hosting health get` |

## data

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/data` | Your data in plain words: whether it is backed up and when, where it is kept, how much of the plan it uses, and anything that needs you. | read | `rivier hosting data get` |
| GET | `/hosting/sites/{id}/data/restore-points` | The earlier moments your data can be restored to. | read | `rivier hosting data restore points` |
| POST | `/hosting/sites/{id}/data/restore` | Prepare your data as it was at an earlier moment beside your current data. Nothing changes until you confirm. | write | `rivier hosting data restore` |
| POST | `/hosting/sites/{id}/data/restore/{rid}/confirm` | Switch the site to the restored data. What it had before is kept briefly. | write | `rivier hosting data restore confirm` |
| DELETE | `/hosting/sites/{id}/data/restore/{rid}` | Cancel a prepared restore and discard the prepared copy. | admin | `rivier hosting data restore cancel` |
| POST | `/hosting/sites/{id}/data/export` | Export my data: the site's records and a dump of what it stores, checked after writing. Kept 30 days. | write | `rivier hosting data export` |
| POST | `/hosting/sites/{id}/data/erase` | First step of deleting my data: makes an export and answers a token good for 15 minutes. Nothing is removed. | write | `rivier hosting data erase request` |
| DELETE | `/hosting/sites/{id}/data/erase` | Second step: present the token. The site's stored data and backups are removed; the export stays 30 days. | admin | `rivier hosting data erase confirm` |

## export

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/exports` | The exports this project holds. | read | `rivier hosting export list` |
| GET | `/hosting/exports/{eid}` | One export with its parts and checksums. | read | `rivier hosting export get` |
| GET | `/hosting/exports/{eid}/download` | Download one part of an export. | read | `rivier hosting export download` |

## mail

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/mail` | Email in plain words: how many emails the site sent today against its daily limit, and for each live domain how many days of authentication reports have been seen and whether the DMARC policy can tighten. | read | `rivier hosting mail get` |

## preview

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/hosting/sites/{id}/deployments/{dep}/share` | A link to a preview on its own address, signed and expiring, kept out of search results. | write | `rivier hosting preview share` |
| DELETE | `/hosting/sites/{id}/deployments/{dep}/share` | Cancel every link already given out for a preview. | admin | `rivier hosting preview revoke` |

## build

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/builds` | Builds of a site, newest first. | read | `rivier hosting build list` |
| GET | `/hosting/sites/{id}/builds/{bid}` | One build with its state, log and the deployment it made. | read | `rivier hosting build get` |
| POST | `/hosting/sites/{id}/builds` | Build a static site from an allow-listed repository. The build runs in a sandbox with no network and no secrets; the result is a preview to promote. | write | `rivier hosting build start` |
| POST | `/hosting/sites/{id}/builds/upload` | Build a static site from source sent as a gzip tar in the request body. | write | `rivier hosting build upload` |
| POST | `/hosting/sites/{id}/builds/{bid}/cancel` | Cancel a build that has not started. | write | `rivier hosting build cancel` |

## block

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/blocks` | The block registry: every block a page can be built from, with its props, slots, bindings, permissions, accessibility notes, tokens and an example. | read | `rivier hosting block list` |

## settings

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/settings` | The site's settings: name, address, theme tokens, languages, AI disclosure line, measurement mode. | read | `rivier hosting settings get` |
| PUT | `/hosting/sites/{id}/settings` | Change the site's settings. Theme values are validated against the token list. | write | `rivier hosting settings save` |

## site page

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/pages` | The pages of a site. | read | `rivier hosting site page list` |
| POST | `/hosting/sites/{id}/pages` | Create a page at a path, optionally with its block tree. | write | `rivier hosting site page create` |
| GET | `/hosting/sites/{id}/pages/{page}` | A page as a flat block tree with its version and its validation issues. | read | `rivier hosting site page get` |
| PATCH | `/hosting/sites/{id}/pages/{page}` | Change a page's title, path (a page that was published leaves a 301 from the old path; a translation may take its own path), search settings or language group (not its blocks: use patch). | write | `rivier hosting site page update` |
| DELETE | `/hosting/sites/{id}/pages/{page}` | Delete a page. A page that is live, has translations, sub-pages or links to it answers 409 with what is affected; repeat with ?confirm=1 (and ?translations=keep\|delete when it has translations). Unapproved translations that are kept become staff-only. | admin | `rivier hosting site page remove` |
| POST | `/hosting/sites/{id}/pages/{page}/validate` | Check a page against the blocks' rules; every issue says what to change. | read | `rivier hosting site page validate` |
| POST | `/hosting/sites/{id}/pages/{page}/patch` | Apply operations (set, unset, insert, remove, move) to blocks by id against a version. Answers applied, preview, proposed (an AI edit of a live page), refused (locks), clash (choose ours or theirs per field) or invalid. | write | `rivier hosting site page patch` |
| POST | `/hosting/sites/{id}/pages/{page}/widgets` | Place a widget block (form, newsletter, reviews, ratings, booking, buy button, cookie consent, language switcher, chat) on a page. The answer says whether the widget is live yet. | write | `rivier hosting site page widget` |
| GET | `/hosting/sites/{id}/pages/{page}/canvas` | What a visual editor needs for a page: every block with its place, author, locks, editable props (type, limits, options), slots (what they take, how many) and text values, plus the blocks that can be added. Pair it with the preview rendered with ?annotate=1, whose elements carry the same ids. | read | `rivier hosting site page canvas` |
| GET | `/hosting/sites/{id}/pages-path` | Whether a path is free for a page (in a language) and why not when it is taken. | read | `rivier hosting site page path check` |
| PUT | `/hosting/sites/{id}/pages-order` | Set the order and nesting of pages: the list gives each page its parent (null: top level) and its place among siblings by position. Refuses loops and parents in another language. | write | `rivier hosting site page order` |
| GET | `/hosting/sites/{id}/pages/{page}/translations/{locale}/units` | Every translatable string of the page in a language: original, translation, and fresh, stale or human. | read | `rivier hosting site page translation units` |
| PATCH | `/hosting/sites/{id}/pages/{page}/translations/{locale}/units` | A person writes or corrects one translated string; it is kept as a human edit when the original changes. | write | `rivier hosting site page edit translation unit` |
| GET | `/hosting/sites/{id}/pages/{page}/translations` | The language versions of a page: which exist, whether a person approved them, how many strings changed in the original since, and which languages are missing. | read | `rivier hosting site page translations` |
| POST | `/hosting/sites/{id}/pages/{page}/translations` | Make a draft of the page in another language of the site (same blocks, prose translated, hidden until a person approves). For a language that exists it refreshes that translation. | write | `rivier hosting site page translate` |
| POST | `/hosting/sites/{id}/pages/{page}/translation/refresh` | Bring a translation up to date with its original: changed strings are re-translated, new blocks added, what a person edited is kept. | write | `rivier hosting site page refresh translation` |
| POST | `/hosting/sites/{id}/pages/{page}/translation/approve` | Let a language version go live with the next release (or withdraw it with approved false). A person only. | write | `rivier hosting site page approve translation` |
| GET | `/hosting/sites/{id}/pages/{page}/comments` | Notes left on a page or on one of its blocks (open ones; ?resolved=1 for all). | read | `rivier hosting site page comments` |
| POST | `/hosting/sites/{id}/pages/{page}/comments` | Leave a note on a page or on one block, or reply to a note. | write | `rivier hosting site page comment` |
| POST | `/hosting/sites/{id}/pages/{page}/comments/{comment}/resolve` | Mark a note done (or open it again). | write | `rivier hosting site page resolve comment` |
| POST | `/hosting/sites/{id}/pages/{page}/presence` | A heartbeat while editing: who else is on the page and on which block, and the page's current version. | write | `rivier hosting site page presence` |
| POST | `/hosting/sites/{id}/pages/{page}/undo` | Undo one change, or the caller's newest, as a new version. | write | `rivier hosting site page undo` |
| GET | `/hosting/sites/{id}/pages/{page}/history` | The changes made to a page, newest first, with who, what and the diff. | read | `rivier hosting site page history` |
| GET | `/hosting/sites/{id}/pages/{page}/preview` | The page rendered from the working copy, as HTML (?annotate=1 marks each block for the designer). | read | `rivier hosting site page preview` |
| POST | `/hosting/sites/{id}/pages/{page}/changes/{change}/decision` | Approve or send back an AI's proposed change to a published page. | write | `rivier hosting site page decide` |

## project

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| PUT | `/hosting/sites/{id}/pages/{page}/project` | Make a page a portfolio project or change its details: cover, summary, year, client, roles, tags, links, order, and who can see it (draft, public, unlisted, expiring; password arrives with the gate). A project starts as a private draft; a person makes it visible. | write | `rivier hosting project set` |
| GET | `/hosting/sites/{id}/pages/{page}/gate-views` | Who opened a password-protected project and when (a time and a hash of the network, newest first). A manager only. | read | `rivier hosting project gate views` |
| DELETE | `/hosting/sites/{id}/pages/{page}/project` | Turn a project back into a plain page (also: PUT the project route with {project: null}). A person only; the page then goes live with the next release like any page, and leaves every collection. | admin | `rivier hosting project clear` |
| GET | `/hosting/sites/{id}/projects` | The portfolio: every project with its details, standing (off, listed, unlisted) and collections, and the collections with their addresses. | read | `rivier hosting project list` |

## theme

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/themes` | The portfolio themes: whole looks (colours, type, radius, spacing, width), each checked for contrast, and which one the site matches now. Dhivehi pages use the Dhivehi typeface with every theme. | read | `rivier hosting theme list` |
| POST | `/hosting/sites/{id}/theme` | Apply a theme by id (a person only); the site's tokens become the theme's and the previous ones are returned so they can be set back. | write | `rivier hosting theme apply` |

## checks

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/hosting/sites/{id}/checks/deep` | Start the real-browser checks without waiting; the answer is a job id. | write | `rivier hosting checks deep start` |
| GET | `/hosting/sites/{id}/checks/deep/{job}` | State of a browser-check job (queued, running, done with the report, or failed). | read | `rivier hosting checks deep job` |
| GET | `/hosting/sites/{id}/checks` | The publish checks over the whole site: accessibility, performance, structured data, plan and consent (?deep=1 adds the real-browser accessibility and speed audit, cached per build). | read | `rivier hosting checks get` |

## website usage

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/website-usage` | AI edits, AI builds and pages used against the plan, with the prompt to show. | read | `rivier hosting website usage get` |

## release

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/releases` | Previews and production releases of the site. | read | `rivier hosting release list` |
| POST | `/hosting/sites/{id}/releases/{release}/approve` | Approve a production release. When the site needs several approvers each different person approves once (with an optional comment); the exact checked files go live with the last one. | write | `rivier hosting release approve` |
| POST | `/hosting/sites/{id}/releases/{release}/reject` | Decline a production release request. | write | `rivier hosting release reject` |
| POST | `/hosting/sites/{id}/releases/{release}/rollback` | Serve an earlier production release again. | write | `rivier hosting release rollback` |

## experiment

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/experiments` | A/B tests of the site with their plans (goal, sample size, the rule for deciding) and readouts. | read | `rivier hosting experiment list` |
| POST | `/hosting/sites/{id}/experiments` | Plan an A/B test of a page or a section: variants are patches, the goal is a click, a form submit or an event, and the baseline rate and the smallest change worth acting on fix how many page views each arm needs. It stays a draft until a person starts it. | write | `rivier hosting experiment create` |
| GET | `/hosting/sites/{id}/experiments/{exp}/readout` | Counts per arm and, only once every arm reaches the planned number of page views, the comparison with the control and the decision the rule gives. | read | `rivier hosting experiment readout` |
| POST | `/hosting/sites/{id}/experiments/{exp}/start` | Start a planned test; visitors see it from the next production release (which a person approves). A person only. | write | `rivier hosting experiment start` |
| POST | `/hosting/sites/{id}/experiments/{exp}/stop` | Stop a test; the control is served from the next production release. A person only. | write | `rivier hosting experiment stop` |
| POST | `/hosting/sites/{id}/experiments/{exp}/promote` | Make a variant the page (one patch to the working copy that can be undone; it goes live with the next approved release). Without a winner by the test's own rule a reason is required. A person only. | write | `rivier hosting experiment promote` |

## library

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/design-library/entries` | Search the design library: palettes, type pairings, section patterns, flows, spacing sets, tones, designs, templates and app shells and screens. Tag filters (including surface: website or app) plus a plain-words query; says whether the ranking used meaning or words only. | read | `rivier hosting library search` |
| GET | `/hosting/design-library/facets` | How many entries carry each tag value, for the filter lists. | read | `rivier hosting library facets` |
| GET | `/hosting/design-library/featured` | The sets the library's maintainers have featured. | read | `rivier hosting library featured` |
| GET | `/hosting/design-library/entries/{entry}` | One entry in full, with its checks, provenance, usage and changelog. With ?version, that exact version, whatever its state. | read | `rivier hosting library get` |
| GET | `/hosting/design-library/entries/{entry}/similar` | Entries like this one. | read | `rivier hosting library similar` |
| POST | `/hosting/design-library/select` | Ranked picks per kind for a design brief, each with reasons; hard requirements remove entries first. | read | `rivier hosting library select` |
| POST | `/hosting/design-library/design` | A complete, coherent design choice from a brief alone (every field optional): palette, type pairing, spacing and shape, sections, flow, closest template, and for apps shell, screens and component style; plus alternatives with a reason each. A brand kit (colours, fonts, voice) acts as constraints: the palette is built from the brand colours with every contrast correction reported, brand fonts without a web licence are replaced by the nearest open pairing. Deterministic and versioned (selectionVersion). | write | `rivier hosting library design` |
| GET | `/hosting/design-library/brand-kit` | The brand kit the library reads from the project's brand assets (colours, fonts and whether they have a web licence, voice words); null when there is none. The design call uses it without being given it. | read | `rivier hosting library brand kit` |
| POST | `/hosting/design-library/palette/evaluate` | Judge a palette being edited (seven colours, or brand colours with overrides): every contrast and colour-blind check with its result, the colours as seen with each kind of colour blindness, and the smallest change that fixes what fails. Stores nothing. | read | `rivier hosting library evaluate palette` |
| POST | `/hosting/design-library/starter-kit` | A first brand for someone with none: a text-mark logo, a palette and two open fonts. Always a draft. | read | `rivier hosting library starter kit` |
| POST | `/hosting/design-library/extract-colours` | Colours from a logo or a picture (sent as base64) and the readable palette built from them, with every contrast correction listed. Nothing is stored. | read | `rivier hosting library extract colours` |

## library favourite

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/design-library/favourites` | The caller's favourite entries. | read | `rivier hosting library favourite list` |
| PUT | `/hosting/design-library/favourites/{entry}` | Mark or unmark a favourite. | write | `rivier hosting library favourite set` |

## library rating

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| PUT | `/hosting/design-library/ratings/{entry}` | Rate an entry from 1 to 5; one rating per project, shown to the maintainers only as an average. | write | `rivier hosting library rating set` |

## library apply

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/hosting/sites/{id}/design-library/preview` | What applying an entry to the site would change: before and after, contrast checks, fonts needed, the versions that would be pinned. Changes nothing. | read | `rivier hosting library apply preview` |
| POST | `/hosting/sites/{id}/design-library/apply` | Apply an entry to the site. Needs a person with manager rights and approve: true; an assistant gets the preview and a request for approval (202). The site pins the version used and the change can be undone. | write | `rivier hosting library apply apply` |
| GET | `/hosting/sites/{id}/design-library/applications` | What has been applied to the site from the library, newest first. | read | `rivier hosting library apply list` |
| POST | `/hosting/sites/{id}/design-library/applications/{application}/undo` | Put back what an applied entry replaced. | write | `rivier hosting library apply undo` |

## library brand

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/hosting/sites/{id}/design-library/brand/preview` | What applying a palette built from the brand colours (the stored brand kit when none is passed) would change on the site: before and after tokens, every contrast correction listed, the checks. Changes nothing. | read | `rivier hosting library brand preview` |
| POST | `/hosting/sites/{id}/design-library/brand/apply` | Apply the brand palette to the site with a person's approval; it can be undone. | write | `rivier hosting library brand apply` |

## library pin

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/design-library/pins` | The library entries the site uses, at the versions it uses. | read | `rivier hosting library pin list` |

## library upgrade

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/design-library/upgrades` | Pinned entries with a newer version, or deprecated or retired, with the changes and the suggested move. Nothing changes on its own. | read | `rivier hosting library upgrade list` |
| POST | `/hosting/sites/{id}/design-library/upgrades/{entry}/preview` | Preview moving a pinned entry to its latest version or its replacement. | write | `rivier hosting library upgrade preview` |
| POST | `/hosting/sites/{id}/design-library/upgrades/{entry}/apply` | Apply the upgrade after a person approved the preview; it can be undone. | write | `rivier hosting library upgrade apply` |

## library preset

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/design-library/presets` | The project's private style presets (the theme and the library picks a site used), for reuse on its own sites. Never shown to other projects. | read | `rivier hosting library preset list` |
| POST | `/hosting/sites/{id}/design-library/presets` | Keep this site's theme and library picks as a private preset of the project. | write | `rivier hosting library preset save` |
| DELETE | `/hosting/sites/{id}/design-library/presets/{preset}` | Remove a private preset. | admin | `rivier hosting library preset remove` |
| POST | `/hosting/sites/{id}/design-library/presets/{preset}/preview` | What applying a private preset to a site would change. | write | `rivier hosting library preset preview` |
| POST | `/hosting/sites/{id}/design-library/presets/{preset}/apply` | Apply a private preset to a site, with a person's approval; it can be undone. | write | `rivier hosting library preset apply` |

## design

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/hosting/sites/{id}/design/turn` | One turn of designing the site by conversation: describe it, answer the (at most two) questions, refine the plan, approve it to build the pages, then refine at site, page or block scope. Changes go through the patch API, so locks, undo and approval of changes to live pages hold. | write | `rivier hosting design turn` |

## design brief

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/design/brief` | The site's design brief: goals, audience, voice, sitemap, decisions, constraints and rejected options, with its stage and version history. | read | `rivier hosting design brief get` |
| PATCH | `/hosting/sites/{id}/design/brief` | Edit the brief directly (goals, audience, voice, constraints, name, sitemap, navigation). | write | `rivier hosting design brief update` |

## design direction

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/sites/{id}/design/directions` | Saved directions (snapshots of the brief, theme and pages) that can be restored. | read | `rivier hosting design direction list` |
| POST | `/hosting/sites/{id}/design/directions` | Save the current direction under a name so it can be restored later. | write | `rivier hosting design direction save` |
| POST | `/hosting/sites/{id}/design/alternatives` | Two or three clearly different looks for the built site (layouts and tokens), saved as directions flagged proposal with stable ids; nothing changes until a person restores one. A person only. | write | `rivier hosting design direction alternatives` |
| POST | `/hosting/sites/{id}/design/directions/{dir}/restore` | Go back to a saved direction: brief, theme and page trees. The current state is saved first. A person only. | write | `rivier hosting design direction restore` |

## template

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/hosting/templates` | The template catalogue (platform starters and the project's own): filter by industry, goal and style, search in plain words; each card shows what the plan lacks. | read | `rivier hosting template list` |
| POST | `/hosting/templates/suggest` | The templates closest to a description, with the words that matched. | read | `rivier hosting template suggest` |
| GET | `/hosting/templates/{tid}` | One template in full: plan, pages as block trees, tokens, manifest versions, what it needs. | read | `rivier hosting template get` |
| GET | `/hosting/templates/{tid}/preview` | A template page rendered with sample content, as HTML. | read | `rivier hosting template preview` |
| DELETE | `/hosting/templates/{tid}` | Remove a template the project saved. | admin | `rivier hosting template remove` |
| POST | `/hosting/sites/{id}/templates/{tid}/instantiate` | Copy a template's pages into the site as drafts (existing pages are never touched), with its tokens and plan; the answer lists what is still to connect. | write | `rivier hosting template instantiate` |
| POST | `/hosting/sites/{id}/templates` | Save the site as the project's own template: structure, tokens and locks kept; pictures, specific entries and products and form ids removed. | write | `rivier hosting template save` |
| GET | `/hosting/sites/{id}/template-upgrades` | The templates this site's pages came from, the version they were made from and the newest one. | read | `rivier hosting template upgrades` |
| POST | `/hosting/sites/{id}/templates/{tid}/upgrade/preview` | What moving to the newest version of a template would change block by block, and what it leaves alone because you changed it. Changes nothing. | read | `rivier hosting template upgrade preview` |
| POST | `/hosting/sites/{id}/templates/{tid}/upgrade/apply` | Merge the newest version of a template into the site: unedited blocks change, edited ones stay, new pages arrive; each changed page is one patch. A person only. | write | `rivier hosting template upgrade apply` |
| POST | `/hosting/sites/{id}/templates/{tid}/upgrade/undo` | Take the last upgrade of a template back, page by page. A person only. | write | `rivier hosting template upgrade undo` |

## site comment

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/public/site/comments` | The approved comments of a published page (name, text, time). | read | `rivier hosting site comment list` |
| POST | `/public/site/comments` | A visitor's comment on a published page: checked for spam and abuse; doubtful ones wait for the owner. | read | `rivier hosting site comment submit` |

## site gate

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/public/site/gate` | Open a password-protected project: the password in the body; right answers return the project's markup. Rate limited; the same answer for a wrong password and an unknown project. | read | `rivier hosting site gate open` |

## page

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/workspace/built` | Pages the business built. | read | `rivier hosting page list` |
| GET | `/workspace/built/{slug}` | One built page. | read | `rivier hosting page get` |
| POST | `/workspace/built` | Build a page. | write | `rivier hosting page create` |
| POST | `/workspace/built/publish` | Publish a built page. | write | `rivier hosting page publish` |
| POST | `/workspace/built/{slug}/restore/{version}` | Restore an earlier version. | write | `rivier hosting page restore` |
