---
title: "Rewind Run"
method: POST
path: "/api/v1/runs/{id}/rewind"
tags: ["Runs"]
---

# Rewind Run

`POST /api/v1/runs/{id}/rewind`

Creates a new run from an earlier checkpoint of a terminal source run, archives the source run, and records `run.superseded_by` on the source after archive succeeds. Returns 207 when the new run was created but the source archive step failed.

## Path parameters

- `id` string, required

## Request body

- RewindRequest — Request body for creating a replacement run from a source run checkpoint.
  - `target` string, nullable — Optional checkpoint target such as `@2`, `build`, or `build@1`. Defaults to the latest checkpoint.

## Response `200`

Source archived and new run created

- RewindResponse — Response returned after rewind creates a new run.
  - `source_run_id` string, required
  - `new_run_id` string, required
  - `target` string, required
  - `archived` boolean, required
  - `archive_error` string, nullable

## Other responses

- `207` — New run created but source archive failed
- `400` — Invalid rewind target
- `404` — Run not found
- `409` — Source run is archived or is not terminal
- `501` — Operation unsupported for this run

---

[API](https://skmtc.net/fabro-sh/apis/fabro-run-api.md) · [All operations](https://skmtc.net/fabro-sh/apis/fabro-run-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fabro-sh/fabro-run-api/versions/bee030053823/schema)
