Auth

Refresh session tokens

POST
/api/auth/refresh

Exchange a valid refresh token for a new access token, socket token, and rotated refresh token. The supplied refresh token is consumed and replaced; an expired or unknown token returns 401.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/auth/refresh" \  -H "Content-Type: application/json" \  -d '{    "refreshToken": "rt_5f7b1c2e8a1d4e0012c3b4a5e6f7a8b9c0d1e2f3a4b5c6d7e8f9"  }'
{  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1Zjdi...",  "socketToken": "st_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",  "refreshToken": "rt_64d2f9c5e8a1d4e001a0b1c2e6f7a8b9",  "sessionConfig": {    "enabled": true,    "idleTimeoutMinutes": 30  },  "user": {    "id": "5f7b1c2e8a1d4e0012c3b4a5",    "email": "admin@acme.example",    "organizationId": "64a1b2c3d4e5f60012345678",    "accessRole": "ADMIN"  }}