---
title: "Clear (soft-archive) a persisted edit"
method: DELETE
path: "/context-documents/tree/edits/{edit_id}"
tags: ["Context Documents"]
---

# Clear (soft-archive) a persisted edit

`DELETE /context-documents/tree/edits/{edit_id}`

Clear an edit — sets cleared_at and removes it from future overlays.

For ADD edits with a corresponding user-prompt stored on
ContextDocConfig.prompts[tier][key], also clear that prompt so the
prompts UI doesn't dangle an entry for a file that no longer exists.

Keeps the row around for audit. To restore, the user re-creates the
edit via PATCH /files.

## Path parameters

- `edit_id` integer, required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

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