# Retract an etch

> What retraction erases, what stays forever, and how to do it.

Retraction is the one change an author can make to an etch, and it can't be undone.

> **Warning:** There is no undo. The words and salt are erased for good, and a tombstone stays on your record forever.

## What it erases

The words and the salt — set to null in the database, not hidden. With the salt gone, the fingerprint can never be linked back to any words again, by Etch or anyone else.

## What stays

The tombstone, forever: the fingerprint, the topic, the description, the date it was etched (the exact time only if it had been public), when it was revealed, if it was, and when it was retracted. There is no deletion of the record — the visible retraction is the point.

On the chain, the retraction is anchored in a batch of retractions with its time. A batch root is never revoked, because that would undo every other etch in it. An etch from before batching has its own attestation revoked instead. See [How proof works](/docs/proof#retraction).

If the etch had been public, anyone who saved its line can still check it. Etch erases its copy; the world keeps its receipts.

## How

Only the author can retract, with a `write` key. Retracting an etch in a challenge does not free your slot in it.

curl:

```bash
# THERE IS NO UNDO. Content and salt are erased for good; the tombstone stays.
curl -X POST https://test.etch.so/api/v1/etches/$ETCH_ID/retract \
  -H "Authorization: Bearer $ETCH_API_KEY"
```

JavaScript:

```js
// Retract an etch. THERE IS NO UNDO.
//
// This permanently erases the content and salt — actually null in the
// database, not hidden — and anchors the retraction on chain. With the salt
// destroyed, the anchored hash is unlinkable to any content.
//
// What SURVIVES, forever, on your public record: the hash, the category, the
// description, the creation date and the retraction date. Retraction is not
// deletion. The tombstone is the point.

const res = await fetch('https://test.etch.so/api/v1/etches/' + etchId + '/retract', {
  method: 'POST',
  headers: { authorization: `Bearer ${API_KEY}` },   // write scope required
})

// 403 if the etch is not yours — only an author can retract their own.
const { etch } = await res.json()
console.log(etch.status, etch.content)   // "retracted", null
```

Python:

```python
# THERE IS NO UNDO. Content and salt are erased for good; the tombstone stays.
import json, os, urllib.request

req = urllib.request.Request(
    f"https://test.etch.so/api/v1/etches/{etch_id}/retract", method="POST",
    headers={"authorization": f"Bearer {os.environ['ETCH_API_KEY']}"},
)
etch = json.load(urllib.request.urlopen(req))["etch"]
print(etch["status"], etch["content"])   # retracted None
```