Get Master Keys Spend By Key
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
Authorization
Optional. Bearer JWT, Virtual Key, or PAT. Server also accepts Cookie alephant_token; not modeled as a header here.
X-Workspace-Id
Optional in the spec; required for authenticated analytics. Omit for unauthenticated GET /v1/analytics/health.
Query parameters
preset
Calendar preset; default 30d.
start
YYYY-MM-DD with end.
end
YYYY-MM-DD with start.
limit
Max keys returned (default 200, max 200).
departmentId
Optional department UUID filter; must be valid if non-empty.
Response
code
message
data