The Alerts API tracks the health of your workforce documentation. Alerts are created automatically by the server-side generation endpoints and remain scoped to the authenticated tenant. Each alert carries a severity level (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Glemynart/SaaS/llms.txt
Use this file to discover all available pages before exploring further.
INFO, WARNING, or CRITICAL) and a lifecycle status (OPEN or RESOLVED). All endpoints require a valid JWT and an active tenant context.
Endpoints
List alerts
createdAt descending. The response also includes an aggregate stats object with counts across open, resolved, and critical states.
Query parameters
Filter by alert lifecycle status. Accepted values:
OPEN, RESOLVED.Filter by alert severity. Accepted values:
INFO, WARNING, CRITICAL.Page number for pagination. Minimum:
1. Default: 1.Number of results per page. Minimum:
1. Default: 20.Response
Array of alert objects matching the applied filters.
Aggregate counts across all alerts for the tenant.
Pagination metadata.
Get a single alert
Path parameters
UUID of the alert to retrieve.
Response
Returns the same fields as a single item in thedata array of GET /alerts. Responds with 404 if the alert does not belong to the tenant.
Resolve an alert
RESOLVED and sets resolvedAt to the current timestamp. No request body is required.
Required roles: ADMIN, OPERADOR
Path parameters
UUID of the alert to resolve.
Response
Returns the updated alert record withstatus: "RESOLVED" and a populated resolvedAt field.
Generate contract expiration alerts
VIGENTE and RENOVADO contracts whose fechaFin falls within the next 30 days from the moment of the call. For each qualifying contract, up to three alerts can be created — one per severity threshold:
| Days remaining | Severity | Title |
|---|---|---|
| ≤ 30 | INFO | Contrato próximo a vencer (30 días) |
| ≤ 15 | WARNING | Contrato próximo a vencer (15 días) |
| ≤ 7 | CRITICAL | Contrato próximo a vencer (7 días) |
ADMIN
Response
Number of new alert records inserted in this run.
Human-readable summary, e.g.
"3 alertas de contrato generadas".Generate missing-contract alerts
ACTIVO employees (non-deleted) that have no VIGENTE or RENOVADO contract registered. Creates one WARNING alert per qualifying employee with the title "Empleado sin contrato registrado".
Required role: ADMIN
Response
Number of new alert records inserted in this run.
Human-readable summary, e.g.
"5 alertas de documentos faltantes generadas".Alert deduplication
The generation endpoints are safe to call repeatedly. Before creating any alert the server checks whether an identical open alert already exists for the same combination ofexpedienteDocId (or employeeId), severity, and status: OPEN. If a match is found, the record is skipped — no duplicate is inserted. This means running the cron job multiple times within the same day will not multiply alerts.
The
dueDate field on a contract alert always reflects the actual fechaFin of the contract — it is not computed as an offset from the generation time. Use dueDate to sort or display the exact expiration date to your users.