Request Account Deletion

Changed on

Self-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.
post/api/auth/account/delete

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

authorizationstring nullable
x-omicos-devicestring nullable
x-omicos-device-kindstring nullable
x-omicos-device-namestring nullable

Request body

passwordstring nullable
codestring nullable

Response

Successful Response

object required

Changes

    • info

      added the new optional header request parameter x-omicos-device

    • info

      added the new optional header request parameter x-omicos-device-kind

    • info

      added the new optional header request parameter x-omicos-device-name