carrier_alerts table, and makes them visible in the Underwriting Workbench.
How It Works
apps/api/src/lib/fmcsa-diff.ts. It compares authority status codes, insurance status, CSA BASIC percentile scores (triggering on changes ≥ 10 points), and out-of-service rates (triggering on changes ≥ 5 percentage points).
Caution:
A chameleon_detected alert is treated as a critical compliance event. It indicates that a
carrier has obtained a new USDOT number to escape a poor safety record — a known fraud pattern.
These alerts bypass normal acknowledgment workflow and are escalated immediately to the compliance
queue.
Alert Types
| Alert Type | Severity | Description |
|---|---|---|
authority_revoked | critical | Operating authority revoked by FMCSA |
authority_suspended | critical | Operating authority suspended |
safety_rating_downgrade | high | Safety rating changed to Conditional or Unsatisfactory |
insurance_lapse | high | Active insurance on file no longer shows as current |
csa_basic_alert | medium | One or more CSA BASIC percentile scores crossed the intervention threshold |
oos_rate_spike | medium | Out-of-service rate increased by ≥ 5 percentage points since last check |
crash_increase | medium | Crash indicator score increased materially |
chameleon_detected | critical | Carrier obtained a new USDOT number to circumvent poor safety record |
API Endpoints
List Alerts
| Parameter | Type | Description |
|---|---|---|
orgId | string | Filter to a specific organization |
carrierId | string | Filter to a specific carrier |
alertType | string | Filter by alert type (e.g. authority_revoked) |
severity | string | Filter by severity (critical, high, medium) |
status | string | open (default) or acknowledged |
limit | number | Page size (default 50, max 200) |
cursor | string | Pagination cursor from previous response |
Alert Count
Returns a summary count grouped by severity, useful for dashboard badges.Acknowledge a Single Alert
status: "acknowledged", acknowledgedAt, and acknowledgedBy populated.
Bulk Acknowledge
Note: Acknowledgment is not the same as resolution. Acknowledged alerts remain in the audit log indefinitely. If the same alert condition recurs on a subsequent cron run, a new alert row is inserted rather than reopening the acknowledged one.
Authorization
All carrier alert endpoints require one of:underwriter, org_admin, compliance_officer, or superadmin role. Acknowledgment operations additionally require that the actor’s organization matches the alert’s orgId (or superadmin for cross-org access).
UW Workbench — CarrierAlertsPanel
TheCarrierAlertsPanel component is embedded inline within the FMCSAPanel in the Underwriting Workbench. It renders the most recent open alerts for the carrier under review, grouped by severity, with inline acknowledgment controls.
The panel polls GET /v1/carrier-alerts?carrierId=...&status=open using TanStack Query with a 60-second refetchInterval. Acknowledging an alert from the panel calls the single-acknowledge endpoint and invalidates the query.
Key Files
| File | Purpose |
|---|---|
apps/api/src/cron/fmcsa-monitor.ts | Daily cron entry point — iterates carriers, calls diff |
apps/api/src/lib/fmcsa-diff.ts | Diff logic — compares FMCSA snapshots, builds alert payloads |
apps/api/src/routes/carrier-alerts.ts | Hono route handlers for all four endpoints |