spend-limits-api changedmanage-claude/spend-limits-api
Nearest release: v2.1.333, published 6 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+1added
Lines−1removed
From line
1,958
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits23to this page, all time
The whole hunk
from line 1958, old and new numbered
/
from line 1958
19581958
19591959 With `time_bucket_width` set, each member has one row for each day with usage. Go through every page to collect every member’s full series.
19601960
19612. Group rows by `group.actor.user_id`. For each member, sum the most recent 7 days and the prior 7 days. Flag members whose recent week exceeds the prior week by your chosen multiple (for example, three). Cost for recent days can still change. For repeatable comparisons, set `ending_at` at or before a `data_refreshed_at` you have already seen (see [Data freshness](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#data-freshness)).
19612. Group rows by `group.actor.user_id`. For each member, sum the most recent 7 days and the prior 7 days. Flag members whose recent week exceeds the prior week by your chosen multiple (for example, three). Cost for recent days can still change, and the last day might be partial (see [Data freshness](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#data-freshness)). To leave that day out, set both dates 1 day earlier in step 1.
19621962
196319633. Act on flagged members: adjust the cap with `POST /v1/organizations/spend_limits`, or contact the member.
19641964
No line in this hunk matches that.