Daily spend series with projection and anomaly flags
Return the per-day spend series for the lookback window (query days, default 30) — the absolute spend amount per day computed from the prepaid-wallet ledger — plus a 7-day forward projection (the trailing 7-day moving average). Historical days whose spend exceeds mean + 2×stddev are flagged as anomalies (the red dots on the dashboard chart). Cached ~5 minutes; degrades to the last-known-good snapshot, then to an empty series, on a DB-availability blip rather than 503ing the always-on dashboard widget. Read-only; billing role.
Authorizations
Dashboard JWT token from Clerk
Headers
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Response
Successful response.