The Workforce Intelligence & Execution OS exposes a versioned REST API built with FastAPI. Every route is mounted under theDocumentation 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.
/api/v1 prefix, responses are JSON, and errors always follow a consistent envelope so client code can handle failures uniformly across every endpoint.
Base URL
All API requests must target the/api/v1 prefix:
Interactive API docs (
/docs) and the OpenAPI schema (/api/v1/openapi.json) are only served in development. Both endpoints are disabled when APP_ENV is set to any value other than development.Health Check
A public health endpoint lives outside the/api/v1 prefix and requires no authentication:
Authentication
Protected endpoints require a valid JWT access token passed as a Bearer credential in theAuthorization header:
POST /api/v1/auth/refresh with a valid refresh token to obtain a new pair. See the Auth Endpoints page for the full login, refresh, and logout flow.
Standard Error Response
Every error returned by the API — whether a validation failure, a missing resource, or an unhandled exception — follows the same envelope:| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code (see table below) |
message | string | Human-readable summary of the problem |
details | array | Optional list of field-level validation details |
Error Codes
| Code | HTTP Status | Meaning |
|---|---|---|
AUTH_ERROR | 401 | Missing, expired, or invalid access token |
PERMISSION_ERROR | 403 | Authenticated but insufficient role or permission |
NOT_FOUND | 404 | Requested resource does not exist |
CONFLICT | 409 | State conflict — e.g., duplicate record |
VALIDATION_ERROR | 422 | Request body or query parameter failed validation |
RATE_LIMIT_ERROR | 429 | Too many requests within the rate-limit window |
INTERNAL_ERROR | 500 | Unhandled server-side exception |
API_ERROR | 4xx | Generic HTTP error not covered by a specific code above |
Rate Limiting
Sensitive auth endpoints are rate-limited per IP to protect against brute-force attacks. Exceeding a limit returns a429 RATE_LIMIT_ERROR.
| Endpoint | Max Attempts | Window |
|---|---|---|
POST /auth/login | 5 | 15 minutes |
POST /auth/forgot-password | 3 | 15 minutes |
POST /auth/reset-password | 5 | 15 minutes |
CORS Configuration
The API configures CORS viaCORSMiddleware. Allowed origins are derived from the FRONTEND_BASE_URL and CORS_ORIGINS environment variables. In development, localhost ports 3000–3002 are also allowed automatically.
Allowed methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD
Allowed request headers: Authorization, Content-Type, Accept, Origin, Range, X-Requested-With
Exposed response headers: Content-Disposition, Content-Length, Content-Range, Accept-Ranges
API Endpoint Groups
Authentication
Login, token refresh, logout, password reset, and account activation.
Users
Create, retrieve, and update user profiles. Scoped by role.
Attendance
Check-in, check-out, breaks, and attendance correction requests.
Leaves & WFH
Submit and resolve leave requests including sick, casual, WFH, and half-day.
Projects & Tasks
Project lifecycle management and task tracking with complexity scoring.
Time Logs
Start/stop timers against tasks and submit manual time entries.
Analytics & Reports
Employee, manager, and admin dashboards plus exportable attendance reports.
Organization
Departments, shifts, holidays, and announcements.
Governance
System alerts, immutable audit logs, and permission definitions.
Realtime
WebSocket connections and presence tracking via WS tickets.
