Skip to content
Rapid Router
Guides · Cost and budgets

Spend alerts

Email, WhatsApp or webhook alerts on daily and monthly thresholds, plus automatic anomaly alerts.

Set a daily or monthly dollar threshold and get told when your spend crosses it, by email, WhatsApp, or a webhook. Settings live at GET /api/v1/alerts and PUT /api/v1/alerts, session-authenticated.

A sweep checks spend every 5 minutes and fires each alert at most once per period: once per UTC day for the daily threshold, once per calendar month for the monthly one. The dedupe is stored in the database, so a redeploy never re-sends the same breach.

Anomaly detection needs no configuration. When your spend in the last hour reaches $1 or more and runs at least 5 times your average hourly spend over the prior 7 days, you are alerted, at most once per day, with the model and key the money went to. An account with no prior traffic has a zero baseline, so any burst of $1 or more counts, which is exactly the stolen-key case the alert exists for. Both events are also delivered to your webhook, configured in the dashboard, as signed POSTs of { event, data, created_at }.

curl -X PUT https://rapidrouter.ai/api/v1/alerts \
  -H "Authorization: Bearer <session JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "daily_usd_threshold": 25,
    "monthly_usd_threshold": 400,
    "alert_phone": "+919876543210",
    "email_enabled": true,
    "wa_enabled": true
  }'

# Thresholds are positive dollars, or null to turn one off.
# alert_phone must be international format (E.164); it is only
# needed when wa_enabled is true. email_enabled defaults to true,
# wa_enabled to false.