Appearance
Recipes
Copy-paste integrations for the places alerts usually come from.
GitHub Actions: page on failed deploy
yaml
- name: Page on-call on failure
if: failure()
run: |
curl -sS -X POST https://anypager.app/api/v1/alerts \
-H "Authorization: Bearer ${{ secrets.ANYPAGER_TOKEN }}" \
-H "Idempotency-Key: gha-${{ github.run_id }}" \
-H "Content-Type: application/json" \
-d "{\"message\": \"Deploy failed: ${{ github.repository }} @ ${{ github.ref_name }}\", \"severity\": \"critical\"}"The Idempotency-Key makes reruns safe — a retried job will not page twice. Store the ap_… token as an encrypted repository secret.
Cron health check
bash
#!/bin/sh
set -eu
if ! curl -fsS --max-time 10 https://example.com/health > /dev/null; then
curl -sS -X POST https://anypager.app/api/v1/alerts \
-H "Authorization: Bearer $ANYPAGER_TOKEN" \
-H "Idempotency-Key: health-$(date -u +%Y%m%d%H%M)" \
-H "Content-Type: application/json" \
-d '{ "message": "example.com health check failed", "severity": "critical" }'
fiThe minute-granular idempotency key collapses repeated failures within the same minute into one page.
Any shell script, via the CLI
If the machine has the CLI paired, skip curl entirely:
bash
./backup.sh || anypager --critical "nightly backup failed on $(hostname)"Long-running job notifier
bash
if make release; then
anypager "release build done"
else
anypager --critical "release build FAILED"
fiThe explicit if keeps the two outcomes separate — with make release && notify || page, a failed success-notification would also fire the failure page.
Webhook bridge
Anything that can send an HTTP request can page you — Grafana, Uptime Kuma, Alertmanager, a Stripe webhook handler. Point it at POST /api/v1/alerts with the token in the Authorization header, map your payload's text into message, and set severity to critical for the pages that must wake someone up.
