The refresh endpoint allows a client to obtain a newDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BladimirGS/judicial-backend/llms.txt
Use this file to discover all available pages before exploring further.
access_token without asking the user to log in again. It reads the refreshToken cookie set during /login, forwards it to the external auth service (/api/AuthJWT/RefreshToken), and returns a fresh JWT. If the external service issues a new refresh token, the cookie is silently rotated as well.
Endpoint
POST /api/auth/refresh
| Property | Value |
|---|---|
| Auth required | No — uses the refreshToken httpOnly cookie instead |
| Request body | None |
| Content-Type | Not required |
Request
No JSON body is needed. The endpoint reads theCookie request header automatically. The browser or HTTP client must send the refreshToken cookie that was set by a previous call to /login.
Response — 200 OK
A successful token renewal returns a newaccess_token. If the external service rotates the refresh token, the Set-Cookie header is updated automatically.
Always
"success" on a 200 response.Human-readable confirmation, e.g.
"Token renovado".Set-Cookie header (conditional)
When the external auth service returns a rotated refresh token, the backend updates the cookie:Set-Cookie header is sent and the existing cookie remains valid.
Error Responses
| Status | Description |
|---|---|
| 401 | Refresh token is missing, expired, or has been revoked — the user must log in again |
| 503 | External auth service is unreachable or returned an unexpected error |
Example
Request
-b cookies.txt flag sends the stored refreshToken cookie, and -c cookies.txt saves any rotated cookie returned by the server.