Exchange a refresh token for a new access + refresh token pair.
Rotates the refresh token (single use): the supplied refresh token is revoked, a new access token + a new refresh token are minted. Clients should overwrite both stored tokens with what they receive here. Rate-limited per token to defeat replay floods.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/token/refresh" \ -H "Content-Type: application/json" \ -d '{ "refreshToken": "oat_…" }'{ "data": { "accessToken": "oat_abcdef1234567890…", "accessTokenExpiresAt": "2026-05-24T19:50:00.000Z", "refreshToken": "oat_zyxwvut0987654321…", "refreshTokenExpiresAt": "2026-06-23T19:35:00.000Z" }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "AUTH_REQUIRED", "message": "Authentication is required to access this resource." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "VALIDATION_ERROR", "message": "One or more fields are invalid.", "fields": [ { "path": "email", "rule": "email", "message": "Must be a valid email address." } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "RATE_LIMITED", "message": "Too many requests — slow down and retry after the indicated delay.", "retryAfterSeconds": 60 }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}Complete a password reset (code + new password). POST
Consumes the code only in the successful password-change transaction and revokes all access/refresh tokens. Validation errors, password reuse, or transaction failure leave the code usable. Password: 8-255 characters, at least one uppercase letter and one digit. Errors: 409 OTP_NOT_FOUND, OTP_INVALID, OTP_EXPIRED, OTP_ALREADY_USED, OTP_LOCKED, or CONFLICT with field:newPassword for reuse; 422 VALIDATION_ERROR with error.fields; 429 RATE_LIMITED with retryAfterSeconds.
Send an OTP to the authenticated user's email for verification. POST
Pulls the destination from the bearer-token user — clients don't need to echo the email. Idempotent: if the email is already verified, the call returns `alreadyVerified: true` and skips sending.