Operation
Erase customer
POST
/customers/{customerId}/eraseErase one customer record, irreversibly. Its name, email, phone, addresses and external id are cleared (the email becomes `erased-@erased.invalid`) and the record is deleted. Their orders, payments, tickets and the ledger stay, with the customer's personal data removed from them: an order's IP address, user agent and the buyer's notes; a payment's card fingerprint and expiry; a ticket's holder name and email. Every personal field is redacted in the history of the customer and their orders, and the notes on them have their body redacted, in the list and in history. One transaction. In a shared organisation this is the person's one record; in an isolated one it is one account's record, and the person's records at other accounts are erased separately. Needs customers.erase for the record's account (for a record with no account, for every account), as a person: held by default by Organisation Owner and Platform Admin only, and never by a key, an embed session or a delegated token. Erasing a record already erased changes nothing and answers 200 with alreadyErased true.
Path parameters
customerIdstringRequired- Customer ID
Headers
Idempotency-KeystringOptional- Makes the write safe to retry. The first request with a key does the work and its response is stored for 24 hours; a repeat with the same key and the same request (method, path, query, X-Ticketlayer-Channel, TL-Version and body) gets that stored status and body back, marked `Idempotent-Replay: true`, without running again. The key is scoped to your organisation and your credential. The same key with a different request is 422 IDEMPOTENCY_KEY_REUSED; a repeat while the first is still running waits for it, then answers 409 IDEMPOTENT_REQUEST_IN_PROGRESS if it has not finished. Only a 2xx is stored: after an error the key is free again. Omit the header and the request behaves as it always has.
Returns
Customer erased, or erased before
Errors
- 400
- Bad Request - Invalid input
- 401
- Unauthorized - Authentication required
- 403
- Forbidden - Insufficient permissions
- 404
- Not Found - Resource not found
- 500
- Internal Server Error
Every error names its code and links to it. All error codes
curl -X POST "https://api.ticketlayer.com/v1/customers/cus_abc123/erase" \ -H "Authorization: Bearer tlak_..." \ -H "X-Ticketlayer-Org: your-org-slug"Response 200
{
"erasure": {
"customerId": "cus_abc123",
"erasedAt": "2026-10-02T10:30:00.000Z",
"alreadyErased": false,
"redacted": {
"orders": 2,
"payments": 2,
"passes": 2,
"notes": 2,
"historyEntries": 2
}
}
}