| Property | Value |
|---|---|
| Auth | Required |
| Required scope | Caller must be the account owner (Clerk-verified) |
| Idempotent | Yes (subsequent calls return 404) |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
confirmation | string | yes | Must be the literal string DELETE. Belt-and-braces against accidental client-side fires. |
Effects
- All rows tagged with the caller’s
accountIdare deleted. - Active Stripe subscription is cancelled (no proration).
- OAuth tokens for connected integrations are revoked at the provider where the API supports it.
- Outgoing webhooks are deleted.
- Audit log entry:
account_deleted(written before the delete cascade).
Errors
| Status | Code | When |
|---|---|---|
| 400 | Missing confirmation | Body missing confirmation: "DELETE". |
| 401 | AUTH_REQUIRED | No session. |
| 403 | FORBIDDEN | Caller is not the account owner. |
| 500 | INTERNAL_ERROR | Cascade failed mid-flight. Sentry traced. |