Get Messages Usage Report changedapi/admin/usage_report/retrieve_messages
Nearest release: v2.1.245, published an hour after 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+27added
Lines−22removed
From line
1
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits5to this page, all time
# Get Messages Usage Report ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## Get Messages Usage Report ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
The whole hunk
from line 1, old and new numbered
/
from line 1
1---
2title: Get Messages Usage Report
3url: https://platform.claude.com/docs/en/api/admin/usage_report/retrieve_messages
4---
1# Get Messages Usage Report
52
6## Get Messages Usage Report
3**GET** `/v1/organizations/usage_report/messages`
74
8**get** `/v1/organizations/usage_report/messages`
9
105Get Messages Usage Report
116
12### Query Parameters
7## Query parameters
138
149- `starting_at: string`
1510
from line 11
1611 Time buckets that start on or after this RFC 3339 timestamp will be returned.
1712 Each time bucket will be snapped to the start of the minute/hour/day in UTC.
1813
14 format: date-time
15
1916- `account_ids: optional array of string`
2017
2118 Restrict usage returned to the specified user account ID(s).
from line 25
2825
2926 Time granularity of the response data.
3027
28 default: 1d
29
3130 - `"1d"`
3231
3332 - `"1h"`
from line 45
4645
4746 Time buckets that end before this RFC 3339 timestamp will be returned.
4847
48 format: date-time
49
4950- `group_by: optional array of "account_id" or "api_key_id" or "context_window" or 6 more`
5051
5152 Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header.
from line 129
128129
129130 Restrict usage returned to the specified workspace ID(s).
130131
131### Header Parameters
132## Headers
132133
133134- `"anthropic-beta": optional array of string`
134135
from line 137
136137
137138 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
138139
139### Returns
140## Returns
140141
141- `MessagesUsageReport object { data, has_more, next_page }`
142- `MessagesUsageReport object`
142143
143 - `data: array of object { ending_at, results, starting_at }`
144 - `data: array of object`
144145
145146 List of time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no usage (their `results` list is empty). A page holds at most `limit` buckets.
146147
from line 149
148149
149150 End of the time bucket (exclusive) in RFC 3339 format.
150151
151 - `results: array of object { account_id, api_key_id, cache_creation, 10 more }`
152 format: date-time
152153
154 - `results: array of object`
155
153156 List of usage items for this time bucket. There may be multiple items if one or more `group_by[]` parameters are specified.
154157
155158 - `account_id: string or null`
from line 163
160163
161164 ID of the API key used. `null` if not grouping by API key or for usage in the Anthropic Console.
162165
163 - `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
166 - `cache_creation: object`
164167
165168 The number of input tokens for cache creation.
166169
from line 206
203206
204207 The number of output tokens generated.
205208
206 - `server_tool_use: object { web_search_requests }`
209 - `server_tool_use: object`
207210
208211 Server-side tool usage metrics.
209212
from line 246
243246
244247 Start of the time bucket (inclusive) in RFC 3339 format.
245248
249 format: date-time
250
246251 - `has_more: boolean`
247252
248253 Indicates if there are more results.
from line 256
251256
252257 Opaque cursor for the next page, or `null` when `has_more` is false. Pass it as the `page` parameter in the next request.
253258
254### Example
259## Example
255260
256```http
261```bash
257262curl https://api.anthropic.com/v1/organizations/usage_report/messages \
258263 -H 'anthropic-version: 2023-06-01' \
259264 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
260265```
261266
262#### Response
267### Response (200)
263268
264269```json
265270{
No line in this hunk matches that.