Documents

Restore an old release — mint a new release from its snapshot

POST
/organizations/{organizationId}/documents/{documentId}/releases/{releaseId}/restore

Append-only restore. Doesn't repoint publishedReleaseId back at the old row; instead mints a new release whose snapshot equals the chosen one. History stays strictly append-only ("v5 published, snapshot equals v3").

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

organizationId*string
Formatuuid
documentId*string
Formatuuid
releaseId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/releases/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore" \  -H "Content-Type: application/json" \  -d '{    "releaseNotes": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",  "version": 1,  "publishedAt": 0,  "publishedBy": "string",  "releaseNotes": "string",  "snapshot": {    "name": "string",    "description": "string",    "type": "policy",    "policyType": "string",    "accessLevel": "public",    "assets": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "format": "html",        "language": "string",        "body": "string",        "file": {          "bucket": "string",          "key": "string",          "size": 0,          "fileName": "string",          "contentType": "string",          "etag": "string",          "sha256": "string"        },        "version": 0,        "dateCreated": 0,        "dateUpdated": 0      }    ],    "quiz": {      "items": [        {}      ],      "passPercent": 1    },    "videoUrl": "http://example.com"  },  "dateCreated": 0,  "dateUpdated": 0}