Xenodia Docs
API ReferenceGenerated Reference

Rotate access and refresh tokens

A refresh token can be exchanged once. Persist both returned tokens atomically and serialize refresh requests; retrying a consumed refresh token returns 401. Rotation keeps the same revocable session family. Revoked, expired and legacy sessionless tokens return 401 and require a fresh sign-in. Do not use a refresh token as a business API bearer token.

POST
/v1/auth/refresh

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.xenodia.xyz/v1/auth/refresh" \  -H "Content-Type: application/json" \  -d '{    "refresh_token": "string"  }'
{
  "access_token": "string",
  "refresh_token": "string",
  "api_key": "string",
  "expires_in": 0,
  "token_type": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}
{
  "error": "string",
  "message": "string",
  "request_id": "string"
}