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

# Deletion

> Let the user delete their data, or delete it yourself. Both are immediate and irreversible.

Two paths, same effect: a hosted manage page for the user, and a purge endpoint for your backend. Both are idempotent, so deleting an already-deleted user succeeds with zero counts.

## What deletion does

For every affected connection:

1. The encryption key of the stored session credential is destroyed. The credential becomes unreadable, including to Verso.
2. The hosted browser profile of the connection is deleted.
3. Every conversation and every stored attachment file of the connection is deleted.
4. The connection is kept as a record with status `revoked` and no credential, so `GET /api/connections` keeps reporting it, with zero conversations.

Deletion is immediate and cannot be undone. To use Verso again, the user goes through the connect flow from scratch.

## The manage page

Sign a link with `purpose: "manage"` and open it for the user.

```typescript theme={null}
const { url } = await signLink(
  { appId: "app_yourapp", userRef: user.id, scopes: ["conversations:read"], purpose: "manage" },
  process.env.VERSO_APP_SECRET!,
);
```

The page shows the user's connections in your app, with provider, status, conversation count and last sync date, and a **Delete all my data** button behind a confirmation. Like connect links, a manage link lasts 15 minutes and works once; it is consumed when the user confirms the deletion, so the page can be refreshed or reopened until then.

After deletion you receive `data.deleted`:

```json theme={null}
{
  "event": "data.deleted",
  "payload": {
    "userRef": "user_123",
    "providers": ["chatgpt"],
    "connectionIds": ["550e8400-e29b-41d4-a716-446655440000"],
    "conversationsDeleted": 142,
    "deletedAt": "2026-09-29T16:00:00.000Z"
  },
  "deliveryId": "…"
}
```

## The purge endpoint

`POST /api/purge` deletes from your backend, for example when the user closes their account with you.

```bash theme={null}
# Everything Verso holds for this user in your app
curl -X POST https://connect.tryverso.ai/api/purge \
  -H "Authorization: Bearer $VERSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "appId": "app_yourapp", "userRef": "user_123" }'

# One connection only
curl -X POST https://connect.tryverso.ai/api/purge \
  -H "Authorization: Bearer $VERSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "appId": "app_yourapp", "connectionId": "550e8400-e29b-41d4-a716-446655440000" }'
```

```json theme={null}
{ "ok": true, "connectionsRevoked": 1, "conversationsDeleted": 142, "deletedAt": "2026-09-29T16:00:00.000Z" }
```

A user purge sends `data.deleted`; a connection purge sends `connection.deleted`. Full parameters and errors are in the [API reference](/api-reference/purge-data).

## After deletion

| You call | You get |
| - | - |
| `GET /api/connections?userRef=` | The user, with every connection `revoked`, `connected: false`, counts at zero |
| `GET /api/conversations?connectionId=` | An empty list |
| `POST /api/ingest-export` on the connection | `409 Connection is revoked` |
