Overview
POST /v1/edits/{edit_id}/revert restores the planner snapshot saved before this edit was applied, rewinds the video clips and timestamps, and updates the edit’s status to reverted. Strict LIFO — only the most recent completed external edit on a video can be reverted; older edits must wait for any newer ones to be reverted first.
Revert runs three preconditions. All three must pass before the snapshot is restored:
- No active edits. Nothing on the video is
processingorqueued. - Strict LIFO. No newer external edit (non-error, non-reverted) exists for this video.
- Snapshot correlation. The top of the video’s
planner_historywas saved by this edit — guards against a frontend edit landing in between.
409 with a detail that names the violated rule.Endpoint
Your
API_BASE is shown in the Developer tab of your dashboard. The default production base is https://api.knowlify.com.Authentication
Send your key in theX-API-Key header. Only the API key that submitted the edit (or another active key in the same organization) may revert it.
Path parameters
string
required
The edit ID returned by
POST /v1/edits. The edit must be in status: "complete".Request body
No body. The path parameter fully specifies the operation.Code examples
Response
A successful revert returns200 with the same shape as GET /v1/edits/{edit_id}, now reflecting the reverted state:
statusis"reverted".is_completeistrue.resultkeeps the originallink/ scene-number arrays from the completed edit, plus a newrevert_diffdescribing what the restore changed.
object
Failure modes
All non-2xx responses share the standard envelope:
{ "detail": "<message>" }. See Errors for the full reference.
Example success response
Limits & errors
- Revert is synchronous from the caller’s perspective — the response returns once the planner has been restored. There is no separate polling step.
- Frame regeneration after a revert is triggered automatically when the restored planner differs from the current one (the internal
/revert-editpipeline handles this). - Full status code reference: Errors.
