---
title: "Delete Data"
method: DELETE
path: "/api/clarity/data"
tags: ["clarity"]
---

# Delete Data

`DELETE /api/clarity/data`

Delete user's Clarity data (GDPR/compliance endpoint).

Permanently deletes the user's saved board. This cannot be undone.
Requires confirm=true in request body to execute.

Headers:
    X-User-ID: User UUID (required)
    X-Internal-Secret: Internal API secret (required in production)

Body:
    confirm: bool (must be true to execute deletion)

Returns:
    200: {"status": "deleted", "message": "...", "deleted": {"clarity_clusters": N}}
    200: {"status": "no_data", "message": "..."}  (idempotent - no data to delete)
    400: Missing or false confirm parameter
    401: Missing or malformed X-User-ID header
    403: Invalid internal secret (production only)
    404: User not found

Transaction Safety:
    Delete and audit log write happen in the SAME database transaction.
    If either fails, the entire transaction rolls back.

## Headers

- `X-Internal-Secret` string, nullable
- `X-User-ID` string, nullable

## Request body

- DeleteDataRequest — Request body for DELETE /api/clarity/data.
  - `confirm` boolean

## Response `200`

Successful Response

- DeleteDataResponse — Response body for DELETE /api/clarity/data. Statuses: - deleted: Data was successfully deleted - no_data: No data found for user (idempotent success)
  - `status` string, required
  - `message` string, required
  - `deleted` object, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/priority-guard/apis/priority-guardian.md) · [All operations](https://skmtc.net/priority-guard/apis/priority-guardian/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/priority-guard/priority-guardian/revisions/8579218b716d/schema)
