The governance API provides the oversight and operational infrastructure of the Workforce Intelligence OS. Alerts deliver system signals to individual users; the audit log captures every sensitive state change as an immutable record visible only to administrators; the ops endpoints manage personal duties (daily task notes) and end-of-day reports with a structured review workflow. All paths are prefixed withDocumentation 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 and require a valid JWT.
Alerts
Alerts are system-generated notifications attached to a specific recipient user. Each alert has a status (OPEN, RESOLVED) and is ordered by creation time with a maximum of 100 returned per request.
GET /api/v1/alerts
Returns up to 100 alerts addressed to the currently authenticated user, ordered newest-first.
Auth: Any authenticated user (get_current_user).
Array of
AlertRead objects.Example Response
PATCH /api/v1/alerts/{alert_id}/resolve
Marks a specific alert as resolved. Only the alert’s intended recipient may resolve it.
Auth: Any authenticated user. Must own the alert.
UUID of the alert to resolve.
Will be
RESOLVED after a successful call.UTC timestamp set at resolution time.
Example Response
Audit Logs
The audit log is the tamper-evident record of sensitive operations performed in the system. Every destructive or privileged action — user role changes, permission overrides, data exports — is written here automatically by the application.GET /api/v1/audit-logs
Returns up to 200 audit log entries ordered by creation time (newest-first).
Auth: ADMIN role required. All other roles receive 403 PERMISSION_ERROR.
Array of
AuditLogRead objects.Audit log entries are written by the server and cannot be created, edited, or deleted via the API. The 200-record cap applies per request.
Example Request
Example Response
System Health
GET /health
A lightweight liveness probe that confirms the API process is running. This endpoint is mounted at the application root — not under the /api/v1 prefix — so it is always reachable even if the versioned router is misconfigured.
Auth: None required. Suitable for load-balancer health checks.
Always
"ok" when the process is running.Example Request
Example Response
Daily Duties
Personal duties are lightweight daily task notes backed byPersonalNote records. They carry a title, optional description, and a pending / completed status. All duty endpoints operate on the currently authenticated user — there is no cross-user access.
GET /api/v1/duties
Returns all duties logged by the authenticated user for today (Asia/Karachi date).
Auth: Any authenticated user.
Array of
DutyRead objects.Example Response
POST /api/v1/duties
Creates a new duty for today.
Auth: Any authenticated user.
Duty title.
Optional additional detail.
UUID of the created duty.
Always
"pending" on creation.Example Request Body
PATCH /api/v1/duties/{duty_id}
Update a duty’s title, description, or completion status.
Auth: Any authenticated user. Must own the duty.
UUID of the duty to update.
Updated title.
Updated description.
Set to
"completed" to mark done, "pending" to reopen.DELETE /api/v1/duties/{duty_id}
Permanently deletes a duty.
Auth: Any authenticated user. Must own the duty.
UUID of the duty to delete.
Always
true on success.End-of-Day Reports
EOD reports are structured daily summaries submitted by employees and reviewed by their direct manager. The workflow progresses through states:Generated → Pending Approval → Approved / Rejected / Needs Revision.
GET /api/v1/eod/me
Returns the authenticated user’s EOD report for a specific date, or null if none exists.
Auth: Any authenticated user.
Report date in ISO format
YYYY-MM-DD. Defaults to today (Asia/Karachi timezone).UUID of the EOD report, or response is
null.GET /api/v1/eod/me/today
Convenience alias for GET /eod/me with today’s date. Returns the current user’s EOD for today or null.
Auth: Any authenticated user.
POST /api/v1/eod/me/generate
Generates (or refreshes) the authenticated user’s EOD report for today by pulling attendance, time logs, and task activity. If a report already exists it is refreshed in place.
Auth: Any authenticated user.
UUID of the generated EOD report.
Report status after generation, e.g.
"Generated".POST /api/v1/eod/me/submit
Submits the authenticated user’s EOD report for manager review.
Auth: Any authenticated user.
Date of the report being submitted. ISO format
YYYY-MM-DD.Free-text summary of work completed today.
Any blockers encountered.
Plan for the following day.
Will be
"Pending Approval" after successful submission.GET /api/v1/eod/team
Returns EOD reports for the manager’s direct reports that have been submitted for review. Supports filtering by status, date, and employee search.
Auth: MANAGER or ADMIN role required.
Filter by employee name, email, role, department, or designation.
Filter by EOD status:
Pending Approval, Approved, Rejected, or Needs Revision.Filter to a specific date ISO
YYYY-MM-DD.Array of
EODReportRead objects for the manager’s direct reports, ordered by date descending.POST /api/v1/eod/{report_id}/review
Reviews a submitted EOD report by approving, rejecting, or requesting revision.
Auth: MANAGER or ADMIN role required. The reviewer must be the submitter’s direct manager.
UUID of the EOD report to review.
Review decision. One of:
Approved, Rejected, Needs Revision.Optional reviewer feedback attached to the report.
UUID of the reviewed report.
Updated status reflecting the review decision.
Comments stored on the report.
Example Request Body
Error Reference
| HTTP Status | Error Code | Reason |
|---|---|---|
401 | AUTH_ERROR | Missing or invalid JWT |
403 | PERMISSION_ERROR | Caller is not authorised (wrong role or not the owner) |
404 | NOT_FOUND | Alert, duty, or EOD report not found |
422 | VALIDATION_ERROR | Invalid review action or missing required fields |
500 | INTERNAL_ERROR | Unhandled server error |
