Updated March 2026
Every time you update a page's content (html, css, or metadata via PUT /api/pages/:id), Sutrena automatically saves a snapshot of the previous version. No configuration needed.
To rollback, call POST /api/pages/:id/rollback. The current content is swapped with the snapshot. The page is live at the previous version immediately u2014 no rebuild, no redeploy.
The rollback is reversible. Calling POST /api/pages/:id/rollback again swaps back to what you had before the first rollback. It toggles between the two versions.
GET /api/pages/:id includes two fields for snapshot state: hasPreviousVersion (boolean, true if a rollback is available) and snapshotAt (ISO timestamp of when the snapshot was taken). Check these before offering a rollback option in your UI or agent workflow.
The MCP tool is sutrena_rollback_page. An agent can update a page, check the result, and roll back if something looks wrong u2014 all within one conversation.
Snapshots cover html, css, metadata, and title. They do not cover slug, publishAt, or isPublished u2014 those are structural settings, not content.
# Update a page (snapshot saved automatically)
curl -X PUT https://sutrena.com/api/pages/PAGE_ID \
-H "Authorization: Bearer st_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "html": "<h1>New version</h1>" }'
# Check if rollback is available
curl https://sutrena.com/api/pages/PAGE_ID \
-H "Authorization: Bearer st_live_your_key"
# Response includes: "hasPreviousVersion": true, "snapshotAt": "2026-03-11T..."
# Rollback to previous version (instant)
curl -X POST https://sutrena.com/api/pages/PAGE_ID/rollback \
-H "Authorization: Bearer st_live_your_key"