The UpdaterAgent authentication API provides endpoints for logging in with credentials, refreshing short-lived JWT access tokens, managing active sessions, and changing passwords. All authenticated endpoints across the rest of the API require a valid access token issued by these endpoints. Tokens expire after 1 hour; use the refresh-token endpoint to obtain a new access token without re-entering credentials.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ShohjahonSohibov/repo-for-agent/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
POST /api/auth/login
Authenticate with email and password. Returns a JWT access token, its expiry timestamp, and the session ID. Also sets an HttpOnlyrefresh-token cookie valid for 7 days.
Request body
The user’s email address.
The user’s password.
A signed JWT to include in the
Authorization header for subsequent requests. Expires after 1 hour.ISO 8601 timestamp indicating when the access token expires.
Numeric ID of the created session. Use with
DELETE /api/auth/sessions/{id} to revoke it.A
Set-Cookie header is also returned with the HttpOnly refresh token: refresh-token=<token>; HttpOnly; Secure; SameSite=Strict; Max-Age=604800POST /api/auth/refresh-token
Exchange therefresh-token cookie for a new JWT access token. No request body is required — the refresh token is read automatically from the cookie sent by the browser.
The
refresh-token cookie has a 7-day lifetime. If it is absent or expired, the response is 401 Unauthorized and the user must log in again.A new JWT access token valid for 1 hour.
ISO 8601 timestamp indicating when the new access token expires.
The same session ID as the original login.
cURL
POST /api/auth/logout
End the current session. Marks the session as inactive, removes the refresh token from the database, and clears therefresh-token cookie. Requires a valid JWT in the Authorization header.
cURL
POST /api/auth/change-password
Change the current user’s password. Requires the existing password for verification. All active sessions for the user are deactivated after a successful password change. Request bodyThe user’s current password, used to confirm identity before changing.
The new password. Must be at least 8 characters and include uppercase, lowercase, and a digit.
cURL
GET /api/auth/sessions
List all active sessions for the currently authenticated user. Returns device name and IP address for each session so you can identify and revoke unfamiliar sessions. ResponseSession ID. Pass to
DELETE /api/auth/sessions/{id} to revoke.The User-Agent string captured when the session was created.
Client IP address at the time of login.
ISO 8601 timestamp of the last token refresh for this session.
ISO 8601 timestamp when the session was created.
cURL
DELETE /api/auth/sessions/
Revoke a specific session by its ID. After revocation, any access token associated with that session will be rejected on the next authorization check. Path parametersThe session ID to revoke. Retrieve session IDs from
GET /api/auth/sessions.cURL
Using the access token
Include the access token in theAuthorization header of every API request:
401 with code Auth.TokenExpired, call POST /api/auth/refresh-token to get a new token — no credentials needed as long as the refresh-token cookie is valid (7-day lifetime).
Error codes
| Code | HTTP Status | Description |
|---|---|---|
Auth.InvalidCredentials | 401 | Email or password is incorrect. |
Auth.Unauthorized | 401 | Token is missing, invalid, or cannot be validated. |
Auth.Forbidden | 403 | Token is valid but the user lacks the required permission. |
Auth.SessionInactive | 401 | The session associated with the token has been revoked. |
Auth.TokenExpired | 401 | The access token has expired. Refresh using the refresh-token cookie. |