Roll back a site (admin)
const url = 'https://example.com/api/sites/example/rollback';const options = { method: 'POST', headers: {'Remote-User': '<Remote-User>', 'Content-Type': 'application/json'}, body: '{"revision":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/sites/example/rollback \ --header 'Content-Type: application/json' \ --header 'Remote-User: <Remote-User>' \ --data '{ "revision": "example" }'Restores a previous version (versioning must be enabled). With an empty
body it restores the latest archived version; with a revision it
promotes that specific revision (see GET …/revisions). Promotion copies
the chosen revision to live, archiving the current content first, so the
promoted revision remains in history.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Full site path — group segments (0–2) plus the slug, e.g. claude/app or demo.
Request Body
Section titled “Request Body”Optional rollback target. Omit revision (or send an empty body) to
restore the latest archived version.
object
A revision ID to promote (current is a no-op). Defaults to the latest archived version.
Examplegenerated
{ "revision": "example"}Responses
Section titled “ Responses ”The restored site.
object
Group path (0–2 segments); empty for a flat site.
Optional preview image URL used by the portal instead of a live iframe.
Total on-disk size in bytes of the current revision’s files.
True when the server has a cached favicon for the site, detected
from the published index.html at publish time. Fetch the bytes from
GET /api/sites/{path}/favicon.
Set when the site is soft-deleted; absent for live sites.
Examplegenerated
{ "id": 1, "group": "example", "slug": "example", "title": "example", "description": "example", "date": "example", "tags": [ "example" ], "repo": "example", "preview": "example", "hidden": true, "size": 1, "has_favicon": true, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z", "deleted_at": "2026-04-15T12:00:00Z"}Invalid request (bad path, malformed body, or missing content).
object
Examplegenerated
{ "error": "example"}Missing or invalid credentials.
object
Examplegenerated
{ "error": "example"}Authenticated, but not permitted for this target/capability.
object
Examplegenerated
{ "error": "example"}No such site, key, or connection.
object
Examplegenerated
{ "error": "example"}