Delete Active Account

DELETE /v1/account

Permanently deletes your active account — the one your dashboard session is currently in — together with its endpoints, certificates and traffic history. This is the same action exposed in the dashboard under Account Settings → Danger zone ("Delete this account").

You stay signed in. After the account is deleted your session switches to another account you belong to. Because every user must always have at least one account, you cannot delete your only account this way — the request is refused. To close your profile entirely (your login and every account you own), use /user instead.

Interactive session only. This irreversible action is refused for API keys and for OAuth/MCP (Iris) tokens — they receive 403 with code: "interactive_session_required". It can only be called from a signed-in dashboard session and requires a step-up re-authentication (your password, plus a 2FA code when MFA is enabled). In practice you trigger it from Account Settings → Danger zone in the dashboard.

Permission required

An interactive session (a signed-in dashboard user), the account owner, and the settings:delete permission on the active account. Non-interactive credentials (API key, OAuth/MCP) are rejected before any check.

Step-up (request body)

Send a JSON body re-confirming the signed-in user. mfa_code is required only when the user has MFA enabled.

password string required
The signed-in user's current password. Missing → 401 reauth_required; wrong → 401 invalid_password.
mfa_code string
A current TOTP or backup code. Required when MFA is enabled: omitted → 401 mfa_required; invalid → 401 invalid_mfa.

Before you can delete

The request is blocked with 409 Conflict until every one of these is resolved on the active account:

Active paid subscription
Cancel the plan's subscription first. See /account/billing.
Other active members
Remove every other member so you are the sole member. See /account/members.
Positive credit balance
The account must not hold a remaining credit balance.
Unpaid invoices
Settle any outstanding invoices before deleting.

Resolve these, then retry the request.

Response (200 OK)

success boolean
true when the account was deleted. Your session then switches to another of your accounts; the response body itself carries only success. Call /account to read the new active context.

Errors

400 Bad Request
This is your only account — it cannot be deleted from here. Use /user to close your profile instead.
401 Unauthorized
Missing or invalid auth, or a failed step-up. The code field distinguishes them: reauth_required, invalid_password, mfa_required, invalid_mfa.
403 Forbidden
A non-interactive credential (API key or OAuth/MCP token) — code: "interactive_session_required" — or: no active account selected, the caller is not the owner, or the caller lacks settings:delete.
409 Conflict
The account has an active subscription, other active members, a positive credit balance, or unpaid invoices. The response body carries a single human-readable reason (see below).

409 response shape

On a conflict the body is a single human-readable error naming the first unresolved reason. Resolve it and retry; if more than one blocker applies, the next is surfaced on the following attempt:

Request — interactive session + step-up
# API keys / OAuth tokens are rejected (403). Called from a signed-in # dashboard session (session cookie), with a password + MFA step-up body. curl -X DELETE "https://api.ngris.com/v1/account" \ -H "Cookie: auth_token=<dashboard_session>" \ -H "X-CSRF-Token: <csrf>" \ -H "Content-Type: application/json" \ -d '{"password": "<your_password>", "mfa_code": "<123456, if MFA enabled>"}'
Note
# Deletion is a dashboard-only action. There is no API-key / SDK path: # a request authenticated with an API key or an OAuth/MCP token returns # 403 {"error": "...", "code": "interactive_session_required"} # Trigger it from the dashboard: Account Settings -> Danger zone.
Response — 200 OK
{ "success": true }
Response — 409 Conflict
{ "error": "account has a live subscription — cancel it first" }
On this page
Delete Active Account