Skip to main content

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:
  1. No active edits. Nothing on the video is processing or queued.
  2. Strict LIFO. No newer external edit (non-error, non-reverted) exists for this video.
  3. Snapshot correlation. The top of the video’s planner_history was saved by this edit — guards against a frontend edit landing in between.
If any guard fails, the response is 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 the X-API-Key header. Only the API key that submitted the edit (or another active key in the same organization) may revert it.
See Authentication for details on key issuance, rotation, and JWT alternatives.

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 returns 200 with the same shape as GET /v1/edits/{edit_id}, now reflecting the reverted state:
  • status is "reverted".
  • is_complete is true.
  • result keeps the original link / scene-number arrays from the completed edit, plus a new revert_diff describing what the restore changed.
object
All other response fields are identical to the poll endpoint.

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-edit pipeline handles this).
  • Full status code reference: Errors.