Restore a document version
View as MarkdownPOST
/v1/documents/{id}/versions/{versionId}/restoreMakes the body read as a saved version again, as a new edit merged into the live document. The body before the restore is kept as a version (previousVersionId): restore it to undo.
curl -X POST "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/versions/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/restore" \
-H "Authorization: Bearer $LYDIE_TOKEN"Path parameters
Response
The version recording the restored body.
The body before the restore.
- versionstring
The body's new content version (for expectedVersion).
{
"versionId": null,
"previousVersionId": null,
"version": "3f9c2a71"
}Errors use one envelope for every endpoint. See Errors and versions.