Appearance
Alert Lifecycle
An alert moves through three states:
text
triggered ──ack──▶ acknowledged ──resolve──▶ resolved
└───────────────── resolve ─────────────────▶- triggered — queued and delivering. For schedule targets, an escalation timer runs until the alert is acknowledged or resolved; member and group alerts deliver once, with no escalation.
- acknowledged — a recipient took ownership; escalation stops. Only alerts with
requires_ack: truepass through this state — others go straight from triggered to resolved. - resolved — the incident is closed. Owners, admins, and the acknowledger can resolve directly from
triggered; acknowledging first is not required.
When requires_ack is true (the default), the alert stays pending on every device until someone acknowledges it. The app badge counts acknowledgement-required alerts until they are resolved — acknowledging alone does not clear it.
Authentication
Lifecycle endpoints act on behalf of a person, so they authenticate with a device key (dk_…, obtained by pairing) or a dashboard session — not with an ap_… integration token:
text
X-API-Key: dk_… # CLI / app device key
# or
Authorization: Bearer dk_…Select a workspace with the X-Workspace-ID header or workspace_id query parameter; without it, your default workspace is used.
List alerts
bash
curl "https://anypager.app/api/v1/alerts?limit=20" \
-H "X-API-Key: dk_your_device_key"limit is 1–100, default 50. Returns newest first. Each alert includes can_ack and can_resolve booleans for the calling user. Members see alerts they received; owners and admins see the whole workspace.
Get one alert
bash
curl https://anypager.app/api/v1/alerts/alrt_9k2f \
-H "X-API-Key: dk_your_device_key"Returns the alert with workspace name and who acknowledged/resolved it, or 404 if it does not exist or you have no access.
Acknowledge
bash
curl -X POST https://anypager.app/api/v1/alerts/alrt_9k2f/ack \
-H "X-API-Key: dk_your_device_key"Stops escalation and records you as the acknowledger. Acknowledging is idempotent: repeating the call on an already-acknowledged alert returns 200 with its current state. 409 is returned when you are not a recipient of the alert or it does not require acknowledgement.
Resolve
bash
curl -X POST https://anypager.app/api/v1/alerts/alrt_9k2f/resolve \
-H "X-API-Key: dk_your_device_key"Closes the incident. Owners, admins, and the member who acknowledged can resolve; otherwise the call returns 403.
Both ack and resolve responses include a badge field — the caller's count of acknowledgement-required alerts that are not yet resolved, which the apps mirror on the icon.
