Account Closure
User-initiated account deactivation and deletion (close-account) service
closure_eligibility
Returns eligibility for both closure paths. Deactivate is always eligible; delete is eligible only when no hard blockers remain.
closure_deactivate
Deactivate the account (reversible logout-lock). Requires a fresh re-auth proof. On success all sessions are revoked.
closure_reactivate
Move a deactivated or delete_pending account back to active. Clears any scheduled deletion. Requires a fresh re-auth proof.
closure_delete_initiate
Step 1 of the delete flow. Verifies re-auth, issues a one-time code to the user's verified phone (or email fallback), and returns the challenge and a single-use reauth token. Throttled to 1 per 24h per user.
closure_delete_confirm
Step 2 of the delete flow. Consumes the re-auth token and verifies the OTP, re-checks eligibility, and runs Phase 1 (transition to delete_pending plus immediate side effects). Returns the scheduled finalize time.
closure_status
Returns the authenticated user's current lifecycle state, the scheduled deletion time (if any), and whether a pending deletion can be cancelled. Reachable while delete_pending so the user can cancel from a live session.
closure_delete_cancel
Cancel a pending deletion during the grace window (delete_pending -> active). Clears the scheduled deletion. Requires a fresh re-auth proof.