---
title: "Sweep Mail Legacy Hashes"
method: POST
path: "/admin/erase/mail-legacy-hashes"
---

# Sweep Mail Legacy Hashes

`POST /admin/erase/mail-legacy-hashes`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/admin/erase/mail-legacy-hashes`
- Auth: none declared

One-shot, idempotent #1010 sweep: strip the legacy plain `body_sha256` from the mail events and
outbox lines of every ERASED subject. `dry_run` defaults to TRUE (counts + message ids only, no
write); a real run needs `dry_run: false`, `confirm: "mail-legacy-hashes"` and a `reason`, which is
recorded with the actor and the counts in the global audit log (`erasure.mail_legacy_sweep`).
`complete: false` means the scan hit its cap: run it again.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
