Restore a saved version (undo)
restore_versionPuts a site back to a version from list_versions - the undo button for AI edits. The current page is saved as a version first, so a restore can itself be undone. Free, and no account is needed for a draft you created.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"version_id": "<version_id>"
},
"name": "restore_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Which page of the site, as its path ("/about", "/contact"). Omit for the home page. See list_pages. | |
| site_key | No | The site to restore. Defaults to the caller's current draft site when omitted. | |
| version_id | Yes | The version to restore, from list_versions. The current page is saved as a version first, so a restore can itself be undone. | |
| draft_token | No | The draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header. |