Skip to main content
Use your refresh token to obtain a new access token and refresh token pair without re-entering your credentials. Your previous refresh token is invalidated after a successful refresh. Endpoint: POST https://api.agentity.to/auth/token/refresh

Request

No Authorization header is required for this endpoint.
refreshToken
string
required
The refresh token returned by the Login or a previous refresh request.

Response

A successful request returns 200 OK with a new token pair.
accessToken
string
required
A new short-lived JWT for authenticating API requests.
refreshToken
string
required
A new long-lived refresh token. Use this on your next refresh request — the previous token is no longer valid.

Errors

StatusDescription
400refreshToken is missing from the request body.
401The refresh token is invalid or has expired.
curl -X POST https://api.agentity.to/auth/token/refresh \
  -H "Content-Type: application/json" \
  -d '{"refreshToken": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4..."}'
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "bmV3UmVmcmVzaFRva2Vu..."
}