> For the complete documentation index, see [llms.txt](https://docs.veilio.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.veilio.xyz/documentation/great-to-know/offboarding.md).

# Offboarding & Account Exit

### Why a guided flow?

Account deletion is **irreversible**. The flow ensures you:

1. Understand the consequences.
2. Export all detokenized data.
3. Archive audit logs.
4. Confirm reintegration into your own systems.
5. Only then delete the account.

### Steps (4 required before deletion)

| Step                 | Requirement                                             | Validation                              |
| -------------------- | ------------------------------------------------------- | --------------------------------------- |
| 1. Understand        | Checkbox acknowledgement                                | Client-side                             |
| 2. Export data       | Full GDPR export (JSON or CSV)                          | Server: `hasCompletedExport` + 2FA      |
| 3. Export audit logs | Download JSON or CSV logs                               | Client: `logsDownloaded` after download |
| 4. Confirm recovery  | Three checkboxes (downloaded / verified / reintegrated) | Client-side                             |
| 5. Delete account    | Password confirmation                                   | `DELETE /api/compliance/delete-account` |

Progress is shown as **X/4** required steps. Deletion stays locked until all four are complete.

### Export data (step 2)

```http
POST /api/compliance/export
Content-Type: application/json

{
  "format": "json",
  "code": "123456"
}
```

* Requires authenticated session + **TOTP 2FA** code.
* Job runs asynchronously; email notification when ready.
* Export **detokenizes all your tokens** — quota checks are bypassed for this operation.
* Download via the one-time link from the offboarding UI or compliance settings.

### Export audit logs (step 3)

```http
GET /api/compliance/logs-export?startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&format=json
```

Choose a date range (default: last 30 days). **Mandatory** before account deletion.

### Inventory preview

Before exporting, the UI loads:

```http
GET /api/compliance/offboarding/summary
```

Returns active token count, datasets, API keys, shredded token count, and export status.

### Crypto-shredded data

Tokens that were **crypto-shredded** are permanently unrecoverable and will **not** appear in the export. The UI warns if shredded tokens exist.

### After deletion

All tokens, logs, API keys, datasets, and the subscription are removed. The user is logged out.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.veilio.xyz/documentation/great-to-know/offboarding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
