Drafts and publishing

Restore a version to live

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

post/versions/{versionId}/restore

Request

  • Base URL
    https://studio.weaverse.io/api/v1/content
  • Auth
    HTTP bearer

Request body

projectIdstring required
type'page' | 'theme' required
confirmstring required

Must equal the versionId

Response

Restored (cacheDelivery=degraded if edge delivery pending)

object required

Changes

No recorded changes to this operation across all 1 revision of this API.