# Erase an End User

`DELETE /v1/end-users/{user}`

Erase what was generated for one of your users, for their privacy requests.

Pass the same `user` id you sent on their requests (URL-encoded). Erased: the request records sent with that id (prompt, parameters, inputs and output links removed; the charge, model and date stay for your invoices) and the images, clips and audio those requests produced, from the CDN and from your library.
Kept: content screening records (declines, strikes), which abuse prevention and the law require us to keep. If the end user has any decline or strike on record, nothing is erased and the response is `held_for_review`: email contact@spicyapi.com with the id and we will review it.
Requests sent without `user` cannot be tied to a person, so send it on every request if your users can ask for erasure.

Base URL: `https://api.spicyapi.com`

## Authorizations

- `Authorization` (string, header, required): Bearer authentication header of the form `Bearer <token>`, where `<token>` is your SpicyAPI key (`sk-spicy-…`). Create one in the dashboard under API Keys.

## Request

```bash
curl --request DELETE \
  --url https://api.spicyapi.com/v1/end-users/user_8f3a2c \
  --header 'Authorization: Bearer $SPICYAPI_KEY'
```

## Response: 200 application/json

Successful Response

- `status` (string, required): `erased` or `held_for_review`.
- `requests` (integer, optional): Request records erased.
- `files` (integer, optional): Generated files deleted.
- `reason` (string, optional): With `held_for_review`: why, and what to do.

```json
{ "object": "end_user.erasure", "user": "user_8f3a2c", "status": "erased", "requests": 42, "files": 37 }
```
