---
title: "PRD-025 — preview or execute source-purge-first support-message erasure"
method: POST
path: "/api/v1/admin/support/erasure"
tags: ["admin"]
---

# PRD-025 — preview or execute source-purge-first support-message erasure

`POST /api/v1/admin/support/erasure`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/admin/support/erasure`
- Auth: none declared

Preview or erase local support rows for one normalized sender email.

Dry-run is the default.  Execute mode is schema-gated on three independent
operator confirmations: the source mailbox was already purged, the email
was repeated exactly after normalization, and the expected local row count
matches at execution time.  Sync and erasure share a PostgreSQL transaction
lock, closing the in-flight-sync re-import race.

The audit row is fail-closed and atomic with deletion.  It identifies the
admin by ``user_id`` but deliberately omits every email, message id, subject,
and body; detail contains action/counts only.  The response is counts-only.
This endpoint remains available when SUPPORT_INBOX_ENABLED is off so a
privacy request is never blocked by an ingestion feature flag.

## Request body

- AdminSupportErasureRequest: Source-purge-first targeted support-message erasure (PRD-025). A preview is the safe default and needs only a valid sender email. Execute mode is intentionally verbose: the operator must attest that the source mailbox was purged, repeat the normalized email, and confirm the exact row count observed in the preview. The endpoint never returns either email.
  - `sender_email` string, email, required
  - `confirm_sender_email` string, email, nullable
  - `source_mailbox_purged` boolean
  - `expected_row_count` integer, nullable
  - `dry_run` boolean

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
