> ## Documentation Index
> Fetch the complete documentation index at: https://docs.knowlify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Control an edit job

> Cancel, retry, approve, or answer a Training or Marketing edit

<Note>
  These routes require the updated API service, worker, and database migration. Check [Testing and availability](/api-reference/testing) before using them in production.
</Note>

Use the `edit_id` from [edit submission](/api-reference/create-edit) or [the edit list](/api-reference/list-jobs). The key must still have access to the edit and its video.

| Action | Training route | Marketing route |
| - | - | - |
| Cancel one edit | `POST /v1/edits/{edit_id}/cancel` | `POST /v1/marketing/edits/{edit_id}/cancel` |
| Retry a failed edit | `POST /v1/edits/{edit_id}/retry` | `POST /v1/marketing/edits/{edit_id}/retry` |
| Approve a saved plan | `POST /v1/edits/{edit_id}/approve` | `POST /v1/marketing/edits/{edit_id}/approve` |
| Answer an edit question | `POST /v1/edits/{edit_id}/clarification` | `POST /v1/marketing/edits/{edit_id}/clarification` |

## Cancel one edit

Cancel a queued edit or an edit that has not started applying changes. Other edits on the video continue. Once apply starts, cancel returns 409. Use [revert](/api-reference/revert-edit) after an eligible edit completes.

```bash theme={null}
curl --fail-with-body -X POST "$API_BASE/v1/edits/$EDIT_ID/cancel" \
  -H "X-API-Key: $KNOWLIFY_API_KEY"
```

The response returns the edit and video IDs with `status: "cancelled"`. A running worker releases its slot when it exits.

## Retry a failed edit

Retry only an edit whose status is `error`. An early failure starts a new edit turn. A failed apply reuses its saved scene changes and edit ID. Read the returned `edit_id` before polling again.

```bash theme={null}
curl --fail-with-body -X POST "$API_BASE/v1/edits/$EDIT_ID/retry" \
  -H "X-API-Key: $KNOWLIFY_API_KEY"
```

The response sets `retry_mode` to `new_turn` or `resume_apply`. A new turn returns a new `edit_id`.

## Approve a saved plan

Set `approval_mode: "manual"` when you [submit the edit](/api-reference/create-edit). Wait for `status: "awaiting_approval"`. Read `required_action.plan`, then approve that saved plan.

```bash theme={null}
curl --fail-with-body -X POST "$API_BASE/v1/edits/$EDIT_ID/approve" \
  -H "X-API-Key: $KNOWLIFY_API_KEY"
```

An outdated plan returns 409. Automatic approval remains the default when you omit `approval_mode`.

## Answer an edit question

When edit status is `awaiting_clarification`, read `required_action.question`. Send the missing detail as `answer`, or cancel the edit. Edit questions do not have a skip action.

```bash theme={null}
curl --fail-with-body -X POST "$API_BASE/v1/edits/$EDIT_ID/clarification" \
  -H "X-API-Key: $KNOWLIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer":"Change scene two only."}'
```

The API checks the saved question before continuing. A stale answer returns 409.
