Alert Types¶
Beta
The Alerts API is in beta. Behavior, field names, and alert types may change before general availability. Contact integration support before relying on it in production.
Every alert has a stable (alertType, alertSubtype) pair, a severity, and a typed details payload. Severity is set deterministically from the subtype.
New subtypes may be added in future minor versions. Treat any unknown subtype as LOW severity and pass it through.
WEIGHT¶
At most one WEIGHT alert per user per day, reflecting the user's current weight-change trajectory.
alertSubtype |
Severity | Meaning |
|---|---|---|
IN_RANGE |
LOW | Healthy loss pace (between -2.0% and -0.1% per week). No action needed. |
TOO_SLOW |
MEDIUM | Loss has stalled or reversed slightly (pace above -0.1% per week). Worth checking adherence. |
TOO_FAST |
HIGH | Loss exceeds the safe corridor (pace below -2.0% per week). Risk of muscle loss. |
AT_GOAL |
LOW | User has reached their target weight. Consider switching to maintenance. |
FIRST_LOG |
LOW | The user's first weigh-in. Baseline established, no trend yet. |
details schema¶
| Field | Type | Description |
|---|---|---|
currentWeightKg |
number | Most recent weight, smoothed. |
weeklyPctChange |
number | Signed percent change vs. the prior week. |
logsUsed |
integer | Number of weight logs that contributed to the calculation. |
lastLogDate |
string (date) | Date of the most recent log used. |
FLEX¶
Lumen's metabolic-flexibility-aware signal, derived from a user's logs over time. FLEX surfaces only the two patterns that warrant clinical attention.
alertSubtype |
Severity | Meaning |
|---|---|---|
DRAMATIC_DROP |
HIGH | Flex score has fallen sharply over a sustained window. Significant adverse drift, warrants outreach. |
PLATEAU |
MEDIUM | Flex score has shown no meaningful movement over a sustained window. |
details schema¶
| Field | Type | Description |
|---|---|---|
stage |
enum | Same value as alertSubtype, repeated for convenience. |
segmentStart |
string (date) | First day of the current trend segment. |
segmentEnd |
string (date) | Last day of the current trend segment. |
ratePctPerWeek |
number | Rate of change across the segment. |
MEDICATION¶
Tracks scheduled-dose adherence over a rolling 7-day window. At most one MEDICATION alert per user per day.
alertSubtype |
Severity | Meaning |
|---|---|---|
MISSED_DOSE_LOW |
LOW | Minor slippage (1 missed dose in the last 7 days, adherence at or above 80%). Routine reminder. |
MISSED_DOSE_MEDIUM |
MEDIUM | Concerning pattern (2-3 missed doses in the last 7 days, adherence between 60% and 80%). Outreach recommended. |
MISSED_DOSE_HIGH |
HIGH | Severe non-adherence (4 or more missed doses in the last 7 days, or no logged dose in the last 72 hours). Escalate. |
details schema¶
| Field | Type | Description |
|---|---|---|
missedDoses7d |
integer | Doses missed in the last 7 days. |
scheduledDoses7d |
integer | Doses scheduled in the last 7 days. |
adherencePct7d |
number | (scheduled - missed) / scheduled * 100. Range [0, 100]. |
lastLoggedDoseAt |
string (ISO 8601) | null | Timestamp of the most recent logged dose, or null if none on file. |
consecutiveMisses |
integer | Length of the current consecutive missed-dose run. |