---
title: "Right to erasure: delete all personal data for a phone number"
method: POST
path: "/v1/compliance/erasure"
tags: ["Compliance / PIPEDA"]
---

# Right to erasure: delete all personal data for a phone number

`POST /v1/compliance/erasure`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/compliance/erasure`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Complies with PIPEDA and Quebec Law 25 right to erasure. Scrubs message bodies and event payloads for the number, and deletes its consent records, verifications, contacts, and webhook dead letters. Deletes its contact-list entries too, except on a DENY list: that entry is kept so the number stays blocked. Opt-out records are kept: CASL requires proof an opt-out was honoured, so this call never deletes one. So is a block HonkIO placed on the number by revoking the upload it came from: erasure does not make its consent recordable again.

Requires `compliance:d`.

## Headers

- `x-step-up-token` string

## Request body

- object
  - `phone_number` string, required
  - `reason` string: Reason for erasure request (for audit log)

## Response `200`

Erased. Opt-out records are kept.

- object: Erased. Opt-out records are kept.
  - `status` 'erased', required
  - `phone_number` string, required
  - `erased_at` string, date-time, required
  - `opt_outs_preserved` true, required

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: FORBIDDEN (the key lacks compliance:d and sent no compliance:d step-up token) or LIVE_KEY_REQUIRED (test keys cannot erase).
- `422`: INVALID_PHONE_NUMBER, CANNOT_ERASE_OWN_NUMBER or VALIDATION_ERROR.
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/honkio/apis/honkio-api.md) · [All operations](https://skmtc.dev/honkio/apis/honkio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/honkio/apis/honkio-api/revisions/ce4ed3fe9691?raw)
