Request Account Deletion
Changed onSelf-service account deletion (cooling-off).
Re-authenticates the caller, then flags the row with a deletion timestamp. The account is immediately treated as logged-out (see current_user), but NO data is removed yet — a successful re-login within ACCOUNT_DELETION_GRACE_DAYS clears the flag (undo). A daily sweep (_purge_due_deletions) hard-deletes rows past the window; the Postgres FK CASCADE then removes all owned data, and the sweep also clears OTP codes and decrements blob ref-counts.
Re-auth path is decided by the account type:
- has a real password → must supply the correct password.
- phone/email-OTP-only → must supply a fresh code (requested via the existing /api/auth/sms|email/send), verified against the same OTP table login uses.
Request
- Base URL: https://api.omicos.cn (the document declares no server; this is the origin it was published from)
- URL: https://api.omicos.cn/api/auth/account/delete
- Auth: none declared
Headers
Request body
Response
Successful Response
Changes
- info
added the new optional
headerrequest parameterx-omicos-device - info
added the new optional
headerrequest parameterx-omicos-device-kind - info
added the new optional
headerrequest parameterx-omicos-device-name
- info