Restore Account
Cancel a pending account deletion during the grace period.
Two mutually exclusive proofs: email + password validates the
account credentials, restore_token consumes the one-shot link from
the deletion notice email (the only path for OAuth-only accounts).
Either flips the account back to ACTIVE, clears the purge deadline,
and sends a cancellation notice to the account address. Only works
while the account is PENDING_DELETION. The hard boundary is the
erasure sweep claiming the account (typically within minutes of the
purge_after deadline from DELETE /api/v1/me), so a restore in
the window between the deadline and the claim still succeeds; once
erasure has started, restore is refused for good.
Authentication: Not required (public endpoint)
Rate Limits: 3/hour
Security: Returns a uniform 403 for wrong credentials, unknown email, invalid or spent tokens, and accounts not pending deletion — prevents account enumeration and state probing.
Body
Request body for POST /auth/restore.
Exactly one restore proof: email + password for accounts with
a password, or restore_token (the one-shot token from the
deletion notice email — the only path for OAuth-only accounts).
Mixing or omitting both is a validation error, not a 403.
Account email address (credential restore)
"user@example.com"
Account password (credential restore)
255"MySecurePass123!"
One-shot restore token from the deletion notice email (token restore — OAuth-only accounts)
16 - 128
