Skip to content
Last updated

POST /v1/auth/refresh - Refresh an expired access token using a valid refresh token. This endpoint provides new JWT tokens without requiring full re-authentication.

POSThttps://api.aitronos.com/v1/auth/refresh

Exchanges a valid refresh token for a new JWT access token. Refresh tokens have longer expiration times and allow seamless token renewal without requiring the user to log in again.

Request Body

refresh_token string required

Valid refresh token obtained from login or previous refresh operation. Must not be empty or contain whitespace.


Returns

A Token Refresh Response object containing the new access token and device information.

token string

New JWT access token for API authentication.

device_id string

Device identifier associated with the token (optional).


Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "device_id": "device-123"
}
Bash
curl -X POST "https://api.aitronos.com/v1/auth/refresh" \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }'

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "device_id": "device-123"
}