> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genlook.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete My Data

> Erase a shopper's Genlook data on request: uploaded photos, generated try-on images, share links, and identity records.

Erase the calling shopper's Genlook data. Use it to power a "Delete my data" control in a custom try-on UI; the built-in widget already offers one.

<Note>
  On JavaScript, the [`@genlook/storefront` SDK](/docs/virtual-tryon/sdk) is the recommended integration. `deleteMyData()` calls this endpoint, then wipes the local history and pending upload, and emits `tryon:data_erased` once the server confirms. It never rejects, so your UI can `await` it and navigate away unconditionally:

  ```javascript SDK theme={null}
  await genlook.deleteMyData();
  ```
</Note>

## What gets erased

Everything tied to the shopper: uploaded photos, generated try-on images, share links (existing links stop working), the shopper's try-on records, and their identity records. Copies in analytics are queued for erasure as well. The merchant's order history and aggregate statistics are detached from the shopper rather than deleted.

## Scope

Erasure is scoped by how the shopper is identified:

* **From the storefront widget or a plugin proxy**, where the customer identity is verified by the shop's server, the erasure covers the shopper's full identity: every device linked to their customer account or email.
* **With a publishable key**, the identity headers are declared by the caller and cannot be verified, so the erasure is deliberately scoped to the calling device's anonymous id. One shopper can never erase another shopper's data.

## Request

No body. The shopper is identified by the standard identity headers (see [identifying the shopper](/docs/virtual-tryon/direct-api-access#identifying-the-shopper)).

This endpoint is rate-limited to 5 requests per minute per caller.

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.genlook.app/storefront/v1/shopper" \
    -H "Authorization: Bearer pk_your_key_here" \
    -H "X-Genlook-Anonymous-Id: anon_1f0e..."
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://api.genlook.app/storefront/v1/shopper", {
    method: "DELETE",
    headers: {
      Authorization: `Bearer ${PUBLISHABLE_KEY}`,
      "X-Genlook-Anonymous-Id": deviceId,
    },
  });
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  `true` once the erasure completed.
</ResponseField>

```json Response theme={null}
{
  "success": true
}
```

Erasure is synchronous and irreversible: a `200` means the data is gone. Clear any history you cached on your side too. The shopper's anonymous id stays usable and now refers to an empty shopper, so you can keep it or mint a new one.

## Errors

| Status | Meaning                                                                        |
| ------ | ------------------------------------------------------------------------------ |
| `429`  | Rate limit exceeded; retry after a pause.                                      |
| `500`  | The erasure could not be completed; nothing was partially confirmed, so retry. |
