Skip to main content
Access tokens expire after 15 minutes. Instead of asking your users to log in again, you can silently obtain a fresh access token by sending your stored refresh token to this endpoint. The API validates the token, issues a new access token and a new refresh token, and immediately revokes the one you just used. This rotation strategy means a stolen refresh token can only be used once before it becomes invalid. No authentication header is required — the refresh token itself is the credential.

Endpoint

Request body

refresh_token
string
required
The refresh token previously issued by POST /auth/login, POST /auth/refresh, or POST /auth/verify-email. Each refresh token can only be used once.

Response

HTTP 200 OK on success.
success
boolean
true on a successful token rotation.
data
object

Example

Response

Token rotation

Every successful call to this endpoint invalidates the refresh token you submitted and replaces it with a brand-new one. You must update your stored refresh token after every rotation. If the same refresh token is used twice — for example because an attacker replayed a captured token — the second attempt returns 401 TOKEN_REVOKED. At that point you should treat the session as compromised, clear all stored tokens, and require the user to log in again. Refresh tokens are also invalidated when you:
  • Call POST /auth/logout
  • Change your password via PATCH /auth/me/password
In both cases any stored refresh token becomes immediately unusable and a new login is required.

Error responses