POST/api/auth/refresh
Exchanges a valid refresh token for a new pair of access token and refresh token.
Send the most recently received `refreshToken` in the JSON body. The response contains a new `token` and a new `refreshToken`. Each refresh token can be used only once and is valid for seven days by default; store the new token after each call and discard the old one. A missing, invalid, expired or already used refresh token results in 400 `VALIDATION_ERROR`. The user then has to sign in again via `POST /api/auth/login`. Because a refresh token is consumed when used, a client should avoid parallel renewals.
Overview
Call: POST /api/auth/refresh. This endpoint belongs to the “Authentication” group of the Zentor App API. It is publicly accessible and requires no authentication. The call is not idempotent: every successful call triggers the action again. Required parameters: refreshToken (body). Documented error cases: 400 VALIDATION_ERROR. The example response below shows the structure of a successful JSON response.
Auth & Security
No authentication required
Idempotent: No
Parameters
refreshToken(body, string, required)— Most recently issued refresh tokenExample Request
{"refreshToken":"<refresh token from /login>"}Example Response
{"ok":true,"token":"<new JWT>","refreshToken":"<new refresh token>"}Error Codes
400 VALIDATION_ERROR — The refresh token is missing, invalid, expired or has already been used.Verified behaviour
A valid refresh token returns a new token pair; an invalid token returns 400 `VALIDATION_ERROR`.
Authentication
POST /api/auth/loginSigns a user in with email address or username and password and issues an access token (JWT) and a refresh token.POST /api/auth/forgot-passwordStarts a password reset: if an account with the given email address exists, it receives an email with a reset link.POST /api/auth/reset-passwordSets a new password using the reset token from the password reset email.POST /api/auth/sso/exchangeFinal step of an SSO login (SAML/OIDC): exchanges the one-time code from the redirect for an access token and a refresh token.