Permanently delete the current admin + all their data
const url = 'http://localhost:8000/api/me/';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:8000/api/me/ \ --header 'Authorization: Bearer <token>'Hard-deletes the signed-in admin and every team where they’re the sole owner (cascading clients, sessions, API keys, and any active subscription). Memberships on other teams come with the admin row via DB cascade. Refuses with 409 if the admin owns a team that still has other members — they must remove members or transfer ownership first; we won’t silently wipe other coaches’ history. The 409 response carries code: "owner_must_transfer_first" plus team_id / team_name / member_count so the client can route the owner to the transfer-ownership flow (POST /api/team/<id>/transfer-ownership/), after which the delete retries and succeeds.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”No response body
object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
409 — the request conflicts with current state. detail is a stable code (e.g. reanalyze_in_flight, already_on_plan, email_in_use). Some 409s carry extra context fields alongside detail; those are documented on the specific endpoint that emits them.
Examples
Transfer ownership first
{ "detail": "Cannot delete account while owner of a team with other members.", "code": "owner_must_transfer_first", "team_id": "2648a781-8751-47c0-836d-2c0189792d71", "team_name": "Acme Coaching", "member_count": 3}