# Privacy

> Erasing a person's details

Source: https://tickets.roostertail.com/docs/reference/privacy

Every operation below is also in [the OpenAPI document](https://tickets.roostertail.com/v1/openapi.yaml). One that names an MCP tool can be called through [the MCP server](https://tickets.roostertail.com/docs/mcp.md); one that names none cannot.

## Erase a person's details

`POST /v1/buyers/erase`

Operation id `eraseBuyer`. MCP tool `erase_buyer`. SDK `tickets.buyers.erase`.

Erases one person's details, found by their email. A phone alone is accepted only when its matches carry one email, else it is refused and asks for the email. The answer says what stayed, and why. `dry_run: true` says what would be erased. A real erase, even one that finds nothing, leaves a keyed hash of the email and phone and nothing else, with no expiry, so the person stays out of history imported later. This cannot be undone.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `privacy.erase` (owner, admin).

**Request body** (`EraseBuyerInput`)

| Field | Type | Description |
| --- | --- | --- |
| `email` | string (email) | An email address. |
| `phone` | string | A phone number in E.164, e.g. +13135550123. |
| `dry_run` | boolean |  |

```json
{
  "email": "jordan@example.com",
  "dry_run": true
}
```

**Answers 200.** Erased (or, dry_run, what would be).

**Fields** (`BuyerErasure`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "buyer_erasure" |  |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `dry_run` * | boolean |  |
| `orders` * | integer |  |
| `tickets` * | integer |  |
| `transfers` * | integer |  |
| `imported` | integer | Sent only when imported buyer rows were found: how many were removed (POST /v1/history/imports keeps a buyer only when the file marks consent). |
| `erased_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

**Errors of its own.** [`invalid_state_transition`](https://tickets.roostertail.com/docs/errors.md#invalid_state_transition). The errors every operation can answer are on [the errors page](https://tickets.roostertail.com/docs/errors.md).
