The Three-Step Reset Flow
1
Request a reset email
Call
POST /auth/password-reset with your email address. The API always returns 202 Accepted — even for unknown addresses — to prevent attackers from enumerating registered accounts. If the account exists, the server invalidates any previous reset token and sends a fresh 6-digit OTP valid for 15 minutes.2
Verify the OTP
Call
POST /auth/password-reset/otp/verify with your email and the 6-digit code from the email. On success you receive a single-use reset token (prefixed rst_). You have 5 attempts; after 5 wrong codes the OTP is invalidated and you must request a new one.3
Set your new password
Call
POST /auth/password-reset/verify with the reset token and your new password. On success the password is updated and all sessions are revoked.Step 1 — Request a Password Reset
Endpoint
Request Body
string
required
The email address associated with your account. The response is identical whether or not this address is registered.
Example Request
Success Response — 202 Accepted
The response body is empty. If the email is registered, a 6-digit OTP is sent to the inbox. Display a generic “check your email” message to the user regardless of whether the address is known.
Error Responses
Step 2 — Verify the OTP
Endpoint
Request Body
string
required
The email address you used in Step 1.
string
required
The 6-digit numeric OTP from your email, e.g.
"123456". Must match the pattern ^\d{6}$.Example Request
Success Response — 200 OK
string
A single-use reset token prefixed
rst_. Pass this to Step 3 within 15 minutes before it expires.Error Responses
The OTP is valid for 15 minutes from when it was issued and is automatically invalidated after 5 incorrect attempts. If either limit is reached, go back to Step 1 and request a new OTP — a new reset replaces any previously active code.
Step 3 — Complete the Password Reset
Endpoint
Request Body
string
required
The reset token returned by Step 2, e.g.
rst_abc123. This token is single-use and expires after 15 minutes.string
required
Your new password. Minimum 8 characters; must include at least one uppercase letter, one lowercase letter, one digit, and one special character.
Example Request
Success Response — 204 No Content
The password has been updated and all active sessions have been revoked. Redirect the user to the login page and prompt them to log in with their new password.
Error Responses
Complete Flow Example
The following curl sequence demonstrates all three steps end-to-end:Related Endpoints
Login
Log in with your new password after the reset completes.
Change Password
Change your password while logged in without going through the reset flow.