Skip to main content

Endpoint

POST /api/auth/refresh
Refresh authentication tokens using a valid refresh token. Returns new access and refresh tokens. No authentication required.

Request body

refreshToken
string
required
Valid refresh token obtained from login or previous refresh.

Response

success
boolean
Indicates whether the request was successful.
timestamp
string
ISO 8601 timestamp of when the response was generated.
data
object
The refresh response data.
data.accessToken
string
New JWT access token for authenticating API requests.
data.refreshToken
string
New JWT refresh token for future token refreshes.

Example request

curl -X POST http://localhost:8080/api/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }'

Example response

{
  "success": true,
  "timestamp": "2026-03-03T10:40:00Z",
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}

Build docs developers (and LLMs) love