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

# Reset Revision

> Clear a failure: move status back to ready, without touching phase

Clear a failure. The revision's `status` moves from `failed` back to `ready`; `phase` is deliberately left
untouched, which is what returns a failed commit and a failed delete alike to the state each can be worked on
from — a failed commit resets to `draft` / `ready` (commit it again), and a failed delete resets to
`commit` / `ready` (delete it again).

## **POST** `/revisions/:id/reset`

Requires Write access to the revision's blob. Allowed on any revision whose status is `failed`, whatever its
phase.

### Path Parameters

| Parameter | Type   | Required | Description                    |
| :-------- | :----- | :------- | :----------------------------- |
| `id`      | string | Yes      | The unique ID of the revision. |

### Response

Returns `{"status": "success"}` — no body beyond the status. Clearing `status` also clears
`failed_operation` in the same write, so a reset revision never carries a stale cause.

### Errors

| Status | Error                 | Cause                                                                          |
| :----- | :-------------------- | :----------------------------------------------------------------------------- |
| 404    | `revision_not_found`  | The id is unknown, or the caller cannot reach its blob.                        |
| 403    | `forbidden`           | The revision's blob is not visible to this key, or the key lacks Write access. |
| 409    | `blob_not_ready`      | The blob is being created or deleted.                                          |
| 409    | `revision_not_failed` | The revision's status is not `failed`.                                         |

### Example

<CodeGroup>
  ```bash Request theme={null}
  curl -X POST https://api.blobhub.io/v1/revisions/rev_002/reset \
    -H "X-API-Key: $API_KEY"
  ```

  ```json Response theme={null}
  {
    "status": "success"
  }
  ```
</CodeGroup>

## See also

* [Delete Revision](/rest-api/revisions/delete-revision) — `failed_operation`'s three values, and what each
  offers besides Reset.
