Skip to content

Refresh a Human Session

Keep a human API session alive by exchanging the refresh token for a fresh token pair.

Best for CLI user and API client Updated April 3, 2026
API In this interface
4 steps Steps
1 examples Examples
Use this path when

Use the refresh endpoint with the current refresh token before the human session expires.

What you'll finish here
  • Refresh before expiry.
  • Replace stored tokens cleanly.
  • Know which auth session types can use refresh.

Where this happens

LabelValueNotes
EndpointPOST /api/v1/auth/refreshRefreshes a human API session.

Same Task, Other Interfaces

Use the version that matches where you are working now. The subject matter stays the same; the delivery changes by surface.

Keep this boundary clear

  • Refresh is for human API sessions only. PATs and automation secrets do not use this flow.

Do the work

  1. 1. Send the current `refreshToken` in the JSON body.
  2. 2. Receive a new access token and refresh token pair in the response.
  3. 3. Replace the previously stored tokens instead of keeping multiple versions around.
  4. 4. Retry protected requests with the fresh access token.

Refresh over REST

bash
curl -X POST http://localhost:5173/api/v1/auth/refresh   -H 'content-type: application/json'   -d '{"refreshToken":"refresh_token_here"}'

Keep Going in Sign In and Sessions

Stay in the same interface and move to the next closest task in this topic when needed.

Nearby Guides

These guides stay close to the current workflow so you can keep moving without restarting discovery.