---
title: "Restore a version to live"
method: POST
path: "/versions/{versionId}/restore"
tags: ["Drafts and publishing"]
---

# Restore a version to live

`POST /versions/{versionId}/restore`

## Request

- Base URL: `https://studio.weaverse.io/api/v1/content`
- URL: `https://studio.weaverse.io/api/v1/content/versions/{versionId}/restore`
- Auth: HTTP bearer

Replaces live content with the content of one version. This overwrites what is live now, so it needs both `content:publish` and `content:delete`, and `confirm` must equal the `versionId` in the path (400 otherwise).

- `type: "page"`: the version's page snapshot is written back to its page, using the assignment recorded on the version. Retired versions (listed by `?kind=retired-pages` on `GET /projects/{projectId}/versions`) can be restored the same way. A legacy version with no recorded assignment restores content only.
- `type: "theme"`: the version's theme settings, preview host, default locale and recent colors are written to the project, and the project revision advances.

**Conflicts (409 `CONFLICT`).** Another change to the same resource landed while restoring, or the version claims a resource binding the server cannot prove. Nothing is changed; `details.handle` names the resource. Retry after re-reading.

**Cache.** If content was restored but edge delivery failed, the response includes `cacheDelivery: "degraded"`. Delivery stays queued and is retried without restoring again.

Required scopes: `content:publish` and `content:delete`

## Request body

- RestoreBody
  - `projectId` string, required
  - `type` 'page' | 'theme', required
  - `confirm` string, required: Must equal the versionId

## Response `200`

Restored (cacheDelivery=degraded if edge delivery pending)

- object

## Other responses

- `401`: Missing or invalid credentials
- `403`: Foreign project or missing scope (INSUFFICIENT_SCOPE)
- `404`: Not found (never discloses other tenants)
- `409`: Concurrent claim; nothing changed — retry

---

[API](https://skmtc.dev/weaverse/apis/weaverse-content-api.md) - [All operations](https://skmtc.dev/weaverse/apis/weaverse-content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weaverse/apis/weaverse-content-api/revisions/d189794169bb?raw)
