Get Master Keys Spend By Key

View as Markdown
Per-master-key spend with previous-window comparison plus a **full-slice** `summary` (not limited by `limit`). **Success `data`:** `window`, `previousWindow`, `summary`, `rows` (camelCase spend fields, `spendChangePercent` may be null). **Optional filters:** `departmentId` (UUID) scopes slice; invalid UUID → 400 / `40013`.

Headers

AuthorizationstringOptional

Optional. Bearer JWT, Virtual Key, or PAT. Server also accepts Cookie alephant_token; not modeled as a header here.

X-Workspace-IdstringOptional

Optional in the spec; required for authenticated analytics. Omit for unauthenticated GET /v1/analytics/health.

Query parameters

presetstringOptional

Calendar preset; default 30d.

startstringOptional

YYYY-MM-DD with end.

endstringOptional

YYYY-MM-DD with start.

limitintegerOptional

Max keys returned (default 200, max 200).

departmentIdstringOptional

Optional department UUID filter; must be valid if non-empty.

Response

codeinteger
messagestring
dataany