Refresh access token
POST /auth/refresh
Refreshes an expired or soon-to-expire access token using a valid refresh token. Returns a new access token and optionally a new refresh token.
This is a command that returns 202 Accepted. The session is updated asynchronously, but new tokens are returned synchronously.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Valid refresh token
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Examples
{ "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}Responses
Section titled “ Responses ”Token refreshed successfully
object
New JWT access token (valid for 1 hour)
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...New JWT refresh token (if rotated, valid for 90 days)
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Access token expiration time in seconds
Example
3600Token type (always “Bearer”)
Example
BearerExamples
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_in": 3600, "token_type": "Bearer"}Bad request (invalid parameters)
object
Error code
Example
unauthorizedHuman-readable error message
Example
Invalid username or passwordAdditional error details (field-level validation errors, etc.)
object
Examples
{ "error": "validation_error", "message": "Invalid request parameters", "details": { "username": "Username is required", "password": "Password must be at least 8 characters" }}Invalid or expired refresh token
object
Error code
Example
unauthorizedHuman-readable error message
Example
Invalid username or passwordAdditional error details (field-level validation errors, etc.)
object
Examples
{ "error": "unauthorized", "message": "Invalid or expired refresh token"}Internal server error
object
Error code
Example
unauthorizedHuman-readable error message
Example
Invalid username or passwordAdditional error details (field-level validation errors, etc.)
object
Examples
{ "error": "internal_error", "message": "An internal error occurred"}