---
title: "Delete User Account"
method: DELETE
path: "/api/users/{user_id}"
---

# Delete User Account

`DELETE /api/users/{user_id}`

## Request

- Base URL: `https://api.adplug.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.adplug.app/api/users/{user_id}`
- Auth: HTTP bearer

Permanently delete a user's account and all associated data.

Order matters:
  1. Cancel the account's Paddle subscriptions. Nothing is deleted unless
     Paddle confirms: without a login the customer could not stop the
     charges themselves.
  2. usage_logs → profiles has NO cascade, so wipe logs first or the
     auth.users delete fails with an FK violation.
  3. auth.users delete cascades to profiles → connections (both have
     ON DELETE CASCADE).
  4. Ask Paddle again. A checkout paid for during steps 1-3 was linked to
     the account after step 1 looked. Anything paid for after this is
     canceled by the webhook, which finds no account.

If step 3 fails after step 2 succeeded, the account is left with no
usage history but otherwise intact. We log the partial state loudly so
ops can reconcile, and return 500 so the client surfaces the error
instead of signing the user out.

## Path parameters

- `user_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/adplug/apis/adplug-api.md) · [All operations](https://skmtc.dev/adplug/apis/adplug-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adplug/apis/adplug-api/revisions/47dbef2d7c84?raw)
