# Erasure · Customer API

> Customer API reference for erasure: GET /erasure, POST /erasure, DELETE /erasure.

> Markdown version of https://kanorio.com/en/developers/customer-api/erasure. Append `.md` to any developer docs URL for this format. Index: https://kanorio.com/llms.txt · MCP: https://app.kanorio.com/api/mcp

Base URL: `https://{site}/api/v1/customer` · [Errors](https://kanorio.com/en/developers/basics/errors) · [Pagination](https://kanorio.com/en/developers/basics/pagination)

### Account deletion status

`GET /erasure`

- Stability: beta

Whether the account was already anonymized and whether a deletion request is scheduled (customers can cancel it until it runs).

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anonymizedAt` | string \| null | yes | Set once the account was anonymized. |
| `pending` | object \| null | yes | The scheduled request, or null. |
| `pending.id` | string | yes | — |
| `pending.contactId` | string | yes | — |
| `pending.requestedBy` | "CUSTOMER" \| "OWNER" \| "AGENT" | yes | — |
| `pending.status` | "REQUESTED" \| "CANCELED" \| "COMPLETED" \| "FAILED" | yes | — |
| `pending.executeAt` | string | yes | When anonymization runs (7 days after a customer's request). |
| `pending.canceledAt` | string \| null | yes | — |
| `pending.completedAt` | string \| null | yes | — |
| `pending.failureReason` | string \| null | yes | — |
| `pending.createdAt` | string | yes | — |

```bash
curl -X GET "https://{site}/api/v1/customer/erasure" \
  -H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN"
```

### Request account deletion (runs after a 7-day grace period)

`POST /erasure`

- Stability: beta

Schedules anonymization 7 days from now. Until then the customer can cancel with DELETE /erasure and the site owner can cancel from the back office. When it runs, identities, name, addresses, tax IDs, passkeys, sessions, form submissions, notes and metadata are removed and sign-in is blocked; orders, invoices and consent evidence (without IP or user agent) remain because the site owner must keep financial records.

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `request` | object | yes | — |
| `request.id` | string | yes | — |
| `request.contactId` | string | yes | — |
| `request.requestedBy` | "CUSTOMER" \| "OWNER" \| "AGENT" | yes | — |
| `request.status` | "REQUESTED" \| "CANCELED" \| "COMPLETED" \| "FAILED" | yes | — |
| `request.executeAt` | string | yes | When anonymization runs (7 days after a customer's request). |
| `request.canceledAt` | string \| null | yes | — |
| `request.completedAt` | string \| null | yes | — |
| `request.failureReason` | string \| null | yes | — |
| `request.createdAt` | string | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `ERASURE_ALREADY_REQUESTED` | 409 | — |
| `ALREADY_ANONYMIZED` | 409 | — |

```bash
curl -X POST "https://{site}/api/v1/customer/erasure" \
  -H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Cancel a scheduled account deletion

`DELETE /erasure`

- Stability: beta

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `request` | object | yes | — |
| `request.id` | string | yes | — |
| `request.contactId` | string | yes | — |
| `request.requestedBy` | "CUSTOMER" \| "OWNER" \| "AGENT" | yes | — |
| `request.status` | "REQUESTED" \| "CANCELED" \| "COMPLETED" \| "FAILED" | yes | — |
| `request.executeAt` | string | yes | When anonymization runs (7 days after a customer's request). |
| `request.canceledAt` | string \| null | yes | — |
| `request.completedAt` | string \| null | yes | — |
| `request.failureReason` | string \| null | yes | — |
| `request.createdAt` | string | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `ERASURE_NOT_PENDING` | 409 | — |

```bash
curl -X DELETE "https://{site}/api/v1/customer/erasure" \
  -H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN"
```
