Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
Refresh an expired access token using a valid refresh token. This endpoint provides new JWT tokens without requiring full re-authentication.
POSThttps://api.freddy.aitronos.com/v1/auth/refresh

Exchanges a valid refresh token for new JWT access and refresh tokens. Refresh tokens have longer expiration times and allow seamless token renewal.

Request Body

refresh_token string required

Valid refresh token obtained from login or previous refresh operation.

Response

token string

New JWT access token.

device_id string

Device identifier associated with the token.


Returns

A Token refresh response object containing new access token and device information.


Response

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

Refresh token request

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

Response examples

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