The Workforce OS API uses a JWT-based authentication scheme. A successful login returns a short-lived access token and a longer-lived refresh token. The access token is passed as aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Paramount-Intelligence/HR_Monitoring_System/llms.txt
Use this file to discover all available pages before exploring further.
Bearer credential on every protected request; the refresh token is used only to rotate the pair when the access token expires. All endpoints below are mounted at /api/v1/auth.
Token expiry defaults — Access tokens expire after 15 minutes and refresh tokens after 7 days. Both values are configurable via the
ACCESS_TOKEN_EXPIRE_MINUTES and REFRESH_TOKEN_EXPIRE_DAYS environment variables respectively.POST /auth/login
Authenticate with email and password. Returns a JWT access token, a refresh token, and basic user profile data.Request Body
The user’s registered email address.
The user’s account password.
Example Request
Response
200 OKResponse Fields
Short-lived JWT (HS256). Include as
Authorization: Bearer <access_token> on all protected requests. Expires after ACCESS_TOKEN_EXPIRE_MINUTES (default 15 minutes).Longer-lived JWT used exclusively to rotate token pairs via
POST /auth/refresh. Expires after REFRESH_TOKEN_EXPIRE_DAYS (default 7 days).Always
"bearer".Authenticated user’s profile snapshot.
POST /auth/refresh
Exchange a valid refresh token for a new access token and a rotated refresh token. Call this endpoint when the access token has expired rather than prompting the user to log in again.Request Body
The refresh token received from a previous login or refresh call.
Example Request
cURL
Response
200 OKNewly issued access token. Valid for
ACCESS_TOKEN_EXPIRE_MINUTES minutes from issue time.Rotated refresh token. The previous refresh token is invalidated immediately. Store this new value.
Always
"bearer".POST /auth/logout
Invalidate the current session. The server revokes the provided refresh token in the database and the client should discard both tokens from local storage or cookies.A valid
Authorization: Bearer <access_token> header is required. The endpoint identifies the acting user from the token, not from the body.Request Body
Optional. The refresh token to explicitly revoke. If omitted, all refresh tokens for the authenticated user are invalidated.
Example Request
cURL
Response
200 OKPOST /auth/forgot-password
Request a password reset email. The API generates a single-use reset token and emails a reset link to the address provided. The response is intentionally vague to prevent user enumeration.Request Body
The email address associated with the account that needs a password reset.
Example Request
cURL
Response
200 OKIn
development mode only, the response also includes a debug_token field containing the raw reset token for testing without a configured SMTP server. This field is never present in production.POST /auth/reset-password
Complete a password reset using the token from the reset email. The token is invalidated immediately after use.Request Body
The password reset token extracted from the reset link sent to the user’s email.
The user’s new password. Minimum 8 characters.
Example Request
cURL
Response
200 OK400 Bad Request:
POST /auth/activate-account
Activate an invited user account and set its initial password. When an Admin or HR user creates a new user, that user’s account is created withstatus=invited. The invitation email contains a unique token that must be submitted here together with the user’s chosen password.
This endpoint is public — it does not require an
Authorization header. The activation page on the frontend must not enforce an auth guard before the invited user has completed activation, as the user does not yet have an active session.Request Body
The invitation token from the activation link sent to the user’s email.
The initial password the user wants to set. Minimum 8 characters.
Example Request
cURL
Response
200 OK400 Bad Request:
status is set to active and they can authenticate via POST /auth/login.
POST /auth/ws-ticket
Issue a short-lived, single-use ticket that authorizes a WebSocket connection. The ticket is passed as a query parameter when opening the WebSocket so that a standardAuthorization header cannot be used in the handshake.
A valid
Authorization: Bearer <access_token> header is required. The ticket is scoped to the authenticated user and cannot be shared.Example Request
cURL
Response
200 OKShort-lived opaque token. Pass as
?ticket=<ticket> when opening a WebSocket connection.Seconds until the ticket expires. Tickets are valid for a very short window — open the WebSocket immediately after obtaining one.
GET /auth/me/permissions
Return the full set of resolved permissions for the currently authenticated user along with their role.Example Request
cURL
Response
200 OKUUID of the authenticated user.
The user’s current role, e.g.
employee, manager, hr, or admin.Alphabetically sorted list of permission strings granted to this user’s role.
