Skip to content
TALA
Esc
navigateopen⌘Jpreview

POST the current refresh token in the body to receive a NEW access token and a ROTATED refresh token. The presented refresh token is single-use and immediately revoked — the client must persist the returned refreshToken. (Replaces the old GET + `ref-tk` header contract.)

POST/api/auth/refresh-token
Request body
requiredapplication/json
refreshTokenstringrequired
The encrypted refresh token issued at login / last refresh.
Responses
200OK
any
401Unauthorized — refresh token missing/invalid/expired, or already used. Replaying a rotated token revokes ALL of the user’s sessions.
any
500Internal Server Error
any
Try it
Server
Bodyapplication/json
Request
curl -X POST "http://localhost:8000/api/auth/refresh-token" \
  -H "Content-Type: application/json" \
  -d '{
  "refreshToken": "iv:authTag:ciphertext"
}'
Response
{
  "data": {
    "token": "*****",
    "refreshToken": "*****"
  }
}