---
title: "Erase your account and everything in it"
method: DELETE
path: "/v1/account"
tags: ["accounts"]
---

# Erase your account and everything in it

`DELETE /v1/account`

## Request

- Base URL: `https://api.hookdetector.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hookdetector.com/v1/account`
- Auth: none declared

Erase the account and every row it owns: all its API keys, runs, hooks, keep or
reject decisions, conversations and messages. It cannot be undone. The body must be
exactly `{"confirm": "delete my account"}` (422 confirmation_required otherwise), and
it is refused with 409 run_in_flight while a run is still queued or running. Any
unspent credits go with the account. Every key stops working at once. Needs admin.
MCP: delete_account.

## Headers

- `authorization` string, nullable: Bearer hd_... from POST /v1/accounts or POST /v1/keys

## Request body

- DeleteAccountIn
  - `confirm` string: must be exactly "delete my account"

## Response `200`

Successful Response

- AccountDeletedOut
  - `deleted` boolean, required
  - `account_id` string, required
  - `erased` object, required: rows erased, per kind
  - `message` string, required

## Other responses

- `401`: missing, invalid, revoked or expired API key (code key_expired)
- `403`: the key lacks the scope this call needs (insufficient_scope), or its credit_limit is spent (key_credit_limit_reached)
- `409`: conflict with the account's state
- `413`: request body over the size cap
- `422`: invalid input
- `500`: our fault; names the request id

---

[API](https://skmtc.dev/hookdetector/apis/hook-detector.md) · [All operations](https://skmtc.dev/hookdetector/apis/hook-detector/llms.txt) · [OpenAPI document](https://skmtc.dev/hookdetector/apis/hook-detector/revisions/b136a2804d2b?raw)
