The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 1
1---
2title: Analytics
3url: https://platform.claude.com/docs/en/api/admin/analytics
4---
5
61# Analytics
72
83## Get Activity Summaries
94
10**get** `/v1/organizations/analytics/summaries`
5**GET** `/v1/organizations/analytics/summaries`
116
127Get organization-wide activity summaries for a date range.
138
from line 14
1914filter[]=rbac_group_id:<id>. Available to organizations on a Claude
2015Enterprise plan. Requires an API key with the `read:analytics` scope.
2116
22### Query Parameters
17### Query parameters
2318
2419- `starting_date: string`
2520
2621 UTC date in YYYY-MM-DD format. Start of the date range (inclusive). Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
2722
23 format: date
24
2825- `ending_date: optional string`
2926
3027 UTC date in YYYY-MM-DD format. End of the date range (exclusive). Data is typically available with a 1-day lag, so this can be at most today — which is also the default when omitted, making the last entry cover the most recent available day. Data may be revised by a few percent over the following days. The range may span at most 366 days.
3128
29 format: date
30
3231- `filter: optional array of string`
3332
3433 Filters as 'dimension:value'. Only rbac_group_id is supported (e.g. filter[]=rbac_group_id:<id>); repeat the param to OR across groups. Scopes the whole day series to members of the matching group(s), re-aggregated from member-level activity — org-wide seat/invite fields and the adoption rates derived from them are null on scoped rows. rbac_group_id accepts the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each UTC day (time-of-usage attribution). At most 100 entries.
3534
35 maxItems: 100
36
3637### Returns
3738
38- `ActivitySummary object { summaries }`
39- `ActivitySummary object`
3940
4041 Response for GET /v1/organizations/analytics/summaries.
4142
42 - `summaries: array of object { assigned_seat_count, cowork_daily_active_user_count, cowork_monthly_active_user_count, 26 more }`
43 - `summaries: array of object`
4344
4445 - `assigned_seat_count: number or null`
4546
from line 160
159160
160161### Example
161162
162```http
163```bash
163164curl https://api.anthropic.com/v1/organizations/analytics/summaries \
164165 -H 'anthropic-version: 2023-06-01' \
165166 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
166167```
167168
168#### Response
169#### Response (200)
169170
170171```json
171172{
from line 206
205206}
206207```
207208
208## Domain Types
209## Domain types
209210
210211### Activity Summary
211212
212- `ActivitySummary object { summaries }`
213- `ActivitySummary object`
213214
214215 Response for GET /v1/organizations/analytics/summaries.
215216
216 - `summaries: array of object { assigned_seat_count, cowork_daily_active_user_count, cowork_monthly_active_user_count, 26 more }`
217 - `summaries: array of object`
217218
218219 - `assigned_seat_count: number or null`
219220
from line 334
333334
334335### Analytics User
335336
336- `AnalyticsUser object { id, email_address, type }`
337- `AnalyticsUser object`
337338
338339 User identifier.
339340
from line 350
349350
350351 Object type. Always `user`.
351352
352 - `"user"`
353 default: user
353354
354355### Analytics User Actor
355356
356- `AnalyticsUserActor object { deleted, email, name, 2 more }`
357- `AnalyticsUserActor object`
357358
358359 - `deleted: boolean`
359360
from line 372
371372
372373 Actor type. Always `"user_actor"`.
373374
374 - `"user_actor"`
375
376375 - `user_id: string`
377376
378377 Tagged user ID.
379378
380379### Connector Office Product Metrics
381380
382- `ConnectorOfficeProductMetrics object { distinct_session_connector_used_count }`
381- `ConnectorOfficeProductMetrics object`
383382
384383 Office Agent activity metrics for a single connector on a given day within one Office product.
385384
from line 388
389388
390389### Office Product Metrics
391390
392- `OfficeProductMetrics object { connectors_used_count, distinct_connectors_used_count, distinct_session_count, 3 more }`
391- `OfficeProductMetrics object`
393392
394393 Office Agent activity metrics for a single user on a given day within one Office product.
395394
from line 418
419418
420419### Skill Office Product Metrics
421420
422- `SkillOfficeProductMetrics object { distinct_session_skill_used_count }`
421- `SkillOfficeProductMetrics object`
423422
424423 Office Agent activity metrics for a single skill on a given day within one Office product.
425424
from line 428
429428
430429### Tool Action Counts
431430
432- `ToolActionCounts object { accepted_count, rejected_count }`
431- `ToolActionCounts object`
433432
434433 Accepted/rejected counts for a single Claude Code tool type.
435434
from line 440
441440
442441 Number of tool proposals rejected
443442
444# Usage
445
446## Get Token Usage Over Time
447
448**get** `/v1/organizations/analytics/usage_report`
443## Analytics › Usage
444
445### Get Token Usage Over Time
446
447**GET** `/v1/organizations/analytics/usage_report`
449448
450449Get token usage over time across a date range.
451450
from line 453
454453Available to organizations on a Claude Enterprise plan. Requires an API
455454key with the `read:analytics` scope.
456455
457### Query Parameters
456#### Query parameters
458457
459458- `starting_at: string`
460459
461460 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
462461
462 format: date-time
463
463464- `bucket_width: optional "1d" or "1h" or "1m"`
464465
465466 Time bucket granularity.
466467
468 default: 1d
469
467470 - `"1d"`
468471
469472 - `"1h"`
from line 477
474477
475478 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
476479
480 maxItems: 100
481
477482 - `"0-200k"`
478483
479484 - `"200k-1M"`
from line 487
482487
483488 End of range, exclusive. When omitted, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
484489
490 format: date-time
491
485492- `group_by: optional array of "context_window" or "inference_geo" or "model" or 4 more`
486493
487494 Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.
488495
496 maxItems: 100
497
489498 - `"context_window"`
490499
491500 - `"inference_geo"`
from line 513
504513
505514 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
506515
516 maxItems: 100
517
507518 - `"global"`
508519
509520 - `"not_available"`
from line 525
514525
515526 Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).
516527
528 minimum: 1
529
517530- `models: optional array of string`
518531
519532 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
520533
534 maxItems: 100
535
521536- `page: optional string`
522537
523538 Opaque cursor from a previous response's `next_page` field.
from line 541
526541
527542 Product surfaces to include. Defaults to all products. Use `group_by[]=product` to break out per-product values. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it.
528543
544 maxItems: 100
545
529546- `rbac_group_ids: optional array of string`
530547
531548 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
532549
550 maxItems: 100
551
533552- `slack_channel_ids: optional array of string`
534553
535554 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
536555
556 maxItems: 100
557
537558- `speeds: optional array of "fast" or "standard"`
538559
539560 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
540561
562 maxItems: 100
563
541564 - `"fast"`
542565
543566 - `"standard"`
from line 569
546569
547570 Filter to specific users by tagged user ID.
548571
549### Returns
550
551- `UsageBucket object { data, data_refreshed_at, has_more, 2 more }`
552
553 - `data: array of object { ending_at, results, starting_at }`
572 maxItems: 100
573
574#### Returns
575
576- `UsageBucket object`
577
578 - `data: array of object`
554579
555580 Time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no data (their `results` list is empty). A page holds at most `limit` buckets.
556581
from line 583
558583
559584 End of the time bucket (exclusive) in RFC 3339 format.
560585
561 - `results: array of object { cache_creation, cache_read_input_tokens, context_window, 10 more }`
586 format: date-time
587
588 - `results: array of object`
562589
563590 Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when `group_by[]` is omitted, or one row per group (subject to the per-bucket group cap described on the `group_by[]` parameter).
564591
565 - `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
592 - `cache_creation: object`
566593
567594 The number of input tokens for cache creation.
568595
from line 641
614641
615642 Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
616643
617 - `server_tool_use: object { web_search_requests }`
644 - `server_tool_use: object`
618645
619646 Server-side tool usage metrics.
620647
from line 669
642669
643670 Start of the time bucket (inclusive) in RFC 3339 format.
644671
672 format: date-time
673
645674 - `data_refreshed_at: string or null`
646675
647676 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case every bucket's `results` list is empty. Buckets beyond this watermark are incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
648677
678 format: date-time
679
649680 - `has_more: boolean`
650681
651682 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
from line 689
658689
659690 ID of the Organization.
660691
661### Example
662
663```http
692#### Example
693
694```bash
664695curl https://api.anthropic.com/v1/organizations/analytics/usage_report \
665696 -H 'anthropic-version: 2023-06-01' \
666697 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
667698```
668699
669#### Response
700##### Response (200)
670701
671702```json
672703{
from line 736
705736}
706737```
707738
708## Get Per-User Token Usage
709
710**get** `/v1/organizations/analytics/user_usage_report`
739### Get Per-User Token Usage
740
741**GET** `/v1/organizations/analytics/user_usage_report`
711742
712743Get per-user token usage across a date range.
713744
from line 750
719750organizations on a Claude Enterprise plan. Requires an API key with the
720751`read:analytics` scope.
721752
722### Query Parameters
753#### Query parameters
723754
724755- `starting_at: string`
725756
726757 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
727758
759 format: date-time
760
728761- `bucket_width: optional "1d" or "1h" or "1m"`
729762
730763 Time-bucket granularity. When set, each row's `starting_at` and `ending_at` are populated and one actor may span several rows (one per time bucket with usage). The time bucket counts toward `limit`, so one page can return multiple rows for the same actor. `ending_at` is required when `bucket_width` is set, and with `bucket_width="1m"` the range may span at most 24 hours. When omitted, each row aggregates the full `[starting_at, ending_at)` range.
from line 772
739772
740773 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
741774
775 maxItems: 100
776
742777 - `"0-200k"`
743778
744779 - `"200k-1M"`
from line 782
747782
748783 End of range, exclusive. When omitted, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
749784
785 format: date-time
786
750787- `exclude_deleted_users: optional boolean`
751788
752789 If true, omit rows for users who are deleted (`deleted: true`). A page may contain fewer than `limit` rows; use `has_more` and `next_page` to paginate as usual.
753790
791 default: false
792
754793- `group_by: optional array of "context_window" or "inference_geo" or "model" or 4 more`
755794
756795 Break each actor's row out by the given dimensions. Accepts the same values as the bucketed `/usage_report` endpoint. `limit` bounds (actor × time bucket × dimension) rows — with dimensions or `bucket_width` present, one actor may span several rows.
757796
797 maxItems: 100
798
758799 - `"context_window"`
759800
760801 - `"inference_geo"`
from line 814
773814
774815 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
775816
817 maxItems: 100
818
776819 - `"global"`
777820
778821 - `"not_available"`
from line 826
783826
784827 Number of rows per page (1-1000, default 20). One row per actor unless `group_by[]` or `bucket_width` splits an actor across rows; `cost_type`/`token_type` fan-out rows (cost endpoint only) are the exception — they do not count toward this limit, so `data` can exceed it.
785828
829 default: 20, maximum: 1000, minimum: 1
830
786831- `models: optional array of string`
787832
788833 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
789834
835 maxItems: 100
836
790837- `order: optional "asc" or "desc"`
791838
792839 Sort direction. Defaults to `desc`.
793840
841 default: desc
842
794843 - `"asc"`
795844
796845 - `"desc"`
from line 848
799848
800849 Metric to rank actors by. Defaults to `total_tokens`.
801850
851 default: total_tokens
852
802853 - `"output_tokens"`
803854
804855 - `"requests"`
from line 866
815866
816867 Product surfaces to include. Defaults to all products. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it.
817868
869 maxItems: 100
870
818871- `rbac_group_ids: optional array of string`
819872
820873 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
821874
875 maxItems: 100
876
822877- `slack_channel_ids: optional array of string`
823878
824879 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
825880
881 maxItems: 100
882
826883- `speeds: optional array of "fast" or "standard"`
827884
828885 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
829886
887 maxItems: 100
888
830889 - `"fast"`
831890
832891 - `"standard"`
from line 894
835894
836895 Filter to specific users by tagged user ID.
837896
838### Returns
839
840- `UserUsage object { data, data_refreshed_at, has_more, 2 more }`
841
842 - `data: array of object { actor, cache_creation, cache_read_input_tokens, 14 more }`
897 maxItems: 100
898
899#### Returns
900
901- `UserUsage object`
902
903 - `data: array of object`
843904
844905 Rows for this page, ranked by `order_by` in the `order` direction. One row per user, or several per user when `group_by[]` or `bucket_width` breaks that user's usage or cost out across rows. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
845906
from line 924
863924
864925 Actor type. Always `"user_actor"`.
865926
866 - `"user_actor"`
867
868927 - `user_id: string`
869928
870929 Tagged user ID.
871930
872 - `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
931 - `cache_creation: object`
873932
874933 The number of input tokens for cache creation.
875934
from line 956
897956
898957 End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to `starting_at` plus one `bucket_width`. Null unless `bucket_width` is set.
899958
959 format: date-time
960
900961 - `inference_geo: "global" or "us" or null`
901962
902963 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
from line 986
925986
926987 Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
927988
928 - `server_tool_use: object { web_search_requests }`
989 - `server_tool_use: object`
929990
930991 Server-side tool usage metrics.
931992
from line 1010
9491010
9501011 Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless `bucket_width` is set; without `bucket_width`, each row aggregates the full requested range.
9511012
1013 format: date-time
1014
9521015 - `total_tokens: number`
9531016
9541017 Total token count across all token types. This is the value the default order_by='total_tokens' sorts on.
from line 1024
9611024
9621025 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
9631026
1027 format: date-time
1028
9641029 - `has_more: boolean`
9651030
9661031 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
from line 1038
9731038
9741039 ID of the Organization.
9751040
976### Example
977
978```http
1041#### Example
1042
1043```bash
9791044curl https://api.anthropic.com/v1/organizations/analytics/user_usage_report \
9801045 -H 'anthropic-version: 2023-06-01' \
9811046 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
9821047```
9831048
984#### Response
1049##### Response (200)
9851050
9861051```json
9871052{
from line 1089
10241089}
10251090```
10261091
1027## Domain Types
1028
1029### Usage Bucket
1030
1031- `UsageBucket object { data, data_refreshed_at, has_more, 2 more }`
1032
1033 - `data: array of object { ending_at, results, starting_at }`
1034
1035 Time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no data (their `results` list is empty). A page holds at most `limit` buckets.
1036
1037 - `ending_at: string`
1038
1039 End of the time bucket (exclusive) in RFC 3339 format.
1040
1041 - `results: array of object { cache_creation, cache_read_input_tokens, context_window, 10 more }`
1042
1043 Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when `group_by[]` is omitted, or one row per group (subject to the per-bucket group cap described on the `group_by[]` parameter).
1044
1045 - `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
1046
1047 The number of input tokens for cache creation.
1048
1049 - `ephemeral_1h_input_tokens: number`
1050
1051 The number of input tokens used to create the 1 hour cache entry.
1052
1053 - `ephemeral_5m_input_tokens: number`
1054
1055 The number of input tokens used to create the 5 minute cache entry.
1056
1057 - `cache_read_input_tokens: number`
1058
1059 The number of input tokens read from the cache.
1060
1061 - `context_window: "0-200k" or "200k-1M" or null`
1062
1063 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
1064
1065 - `"0-200k"`
1066
1067 - `"200k-1M"`
1068
1069 - `inference_geo: "global" or "us" or null`
1070
1071 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
1072
1073 - `"global"`
1074
1075 - `"us"`
1076
1077 - `model: string or null`
1078
1079 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-4-6`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
1080
1081 - `output_tokens: number`
1082
1083 The number of output tokens generated.
1084
1085 - `product: string or null`
1086
1087 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it. Some unattributed usage is reported as "other".
1088
1089 - `rbac_group_id: string or null`
1090
1091 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has ONE id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query with no group_by.
1092
1093 - `requests: number or null`
1094
1095 Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
1096
1097 - `server_tool_use: object { web_search_requests }`
1098
1099 Server-side tool usage metrics.
1100
1101 - `web_search_requests: number`
1102
1103 The number of web search requests made.
1104
1105 - `slack_channel_id: string or null`
1106
1107 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
1108
1109 - `speed: "fast" or "standard" or null`
1110
1111 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
1112
1113 - `"fast"`
1114
1115 - `"standard"`
1116
1117 - `uncached_input_tokens: number`
1118
1119 The number of uncached input tokens processed.
1120
1121 - `starting_at: string`
1122
1123 Start of the time bucket (inclusive) in RFC 3339 format.
1124
1125 - `data_refreshed_at: string or null`
1126
1127 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case every bucket's `results` list is empty. Buckets beyond this watermark are incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
1128
1129 - `has_more: boolean`
1130
1131 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
1132
1133 - `next_page: string or null`
1134
1135 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
1136
1137 - `organization_id: string`
1138
1139 ID of the Organization.
1140
1141### User Usage
1142
1143- `UserUsage object { data, data_refreshed_at, has_more, 2 more }`
1144
1145 - `data: array of object { actor, cache_creation, cache_read_input_tokens, 14 more }`
1146
1147 Rows for this page, ranked by `order_by` in the `order` direction. One row per user, or several per user when `group_by[]` or `bucket_width` breaks that user's usage or cost out across rows. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
1148
1149 - `actor: AnalyticsUserActor`
1150
1151 The user this row's usage or cost is attributed to. Always a `user_actor`.
1152
1153 - `deleted: boolean`
1154
1155 True when the user is no longer a member of the organization or its associated organizations: either their membership was removed (for example, deprovisioned via your identity provider) or the account itself has been deleted. The flag reflects organization membership, not account status. `name` and `email` stay populated for removed members; `name` is `"Deleted User"` and `email` null when the account has been deleted. The `user_id` is still populated for reconciliation.
1156
1157 - `email: string or null`
1158
1159 The user's email address, including for users who are no longer members of the organization or its associated organizations. Null when the account has been deleted (check `deleted`) and for system-minted service accounts, which have no person's mailbox behind them (check `name`).
1160
1161 - `name: string or null`
1162
1163 The user's current name, including for users who are no longer members of the organization or its associated organizations. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted. Rows for system-minted service accounts render the service name (for example, `"Claude Security"` for usage by Anthropic's security-patching service) or null.
1164
1165 - `type: "user_actor"`
1166
1167 Actor type. Always `"user_actor"`.
1168
1169 - `"user_actor"`
1170
1171 - `user_id: string`
1172
1173 Tagged user ID.
1174
1175 - `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
1176
1177 The number of input tokens for cache creation.
1178
1179 - `ephemeral_1h_input_tokens: number`
1180
1181 The number of input tokens used to create the 1 hour cache entry.
1182
1183 - `ephemeral_5m_input_tokens: number`
1184
1185 The number of input tokens used to create the 5 minute cache entry.
1186
1187 - `cache_read_input_tokens: number`
1188
1189 The number of input tokens read from the cache.
1190
1191 - `context_window: "0-200k" or "200k-1M" or null`
1192
1193 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
1194
1195 - `"0-200k"`
1196
1197 - `"200k-1M"`
1198
1199 - `ending_at: string or null`
1200
1201 End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to `starting_at` plus one `bucket_width`. Null unless `bucket_width` is set.
1202
1203 - `inference_geo: "global" or "us" or null`
1204
1205 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
1206
1207 - `"global"`
1208
1209 - `"us"`
1210
1211 - `model: string or null`
1212
1213 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-4-6`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
1214
1215 - `output_tokens: number`
1216
1217 The number of output tokens generated.
1218
1219 - `product: string or null`
1220
1221 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it. Some unattributed usage is reported as "other".
1222
1223 - `rbac_group_id: string or null`
1224
1225 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has ONE id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query with no group_by.
1226
1227 - `requests: number or null`
1228
1229 Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
1230
1231 - `server_tool_use: object { web_search_requests }`
1232
1233 Server-side tool usage metrics.
1234
1235 - `web_search_requests: number`
1236
1237 The number of web search requests made.
1238
1239 - `slack_channel_id: string or null`
1240
1241 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
1242
1243 - `speed: "fast" or "standard" or null`
1244
1245 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
1246
1247 - `"fast"`
1248
1249 - `"standard"`
1250
1251 - `starting_at: string or null`
1252
1253 Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless `bucket_width` is set; without `bucket_width`, each row aggregates the full requested range.
1254
1255 - `total_tokens: number`
1256
1257 Total token count across all token types. This is the value the default order_by='total_tokens' sorts on.
1258
1259 - `uncached_input_tokens: number`
1260
1261 The number of uncached input tokens processed.
1262
1263 - `data_refreshed_at: string or null`
1264
1265 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
1266
1267 - `has_more: boolean`
1268
1269 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
1270
1271 - `next_page: string or null`
1272
1273 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
1274
1275 - `organization_id: string`
1276
1277 ID of the Organization.
1278
1279# Cost
1280
1281## Get Cost Over Time
1282
1283**get** `/v1/organizations/analytics/cost_report`
1092## Analytics › Cost
1093
1094### Get Cost Over Time
1095
1096**GET** `/v1/organizations/analytics/cost_report`
12841097
12851098Get cost in USD over time across a date range.
12861099
from line 1102
12891102token type. Available to organizations on a Claude Enterprise plan.
12901103Requires an API key with the `read:analytics` scope.
12911104
1292### Query Parameters
1105#### Query parameters
12931106
12941107- `starting_at: string`
12951108
12961109 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
12971110
1111 format: date-time
1112
12981113- `bucket_width: optional "1d" or "1h" or "1m"`
12991114
13001115 Time bucket granularity.
13011116
1117 default: 1d
1118
13021119 - `"1d"`
13031120
13041121 - `"1h"`
from line 1126
13091126
13101127 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
13111128
1129 maxItems: 100
1130
13121131 - `"0-200k"`
13131132
13141133 - `"200k-1M"`
from line 1136
13171136
13181137 End of range, exclusive. When omitted, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
13191138
1139 format: date-time
1140
13201141- `group_by: optional array of "context_window" or "cost_type" or "inference_geo" or 6 more`
13211142
13221143 Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.
13231144
1145 maxItems: 100
1146
13241147 - `"context_window"`
13251148
13261149 - `"cost_type"`
from line 1166
13431166
13441167 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
13451168
1169 maxItems: 100
1170
13461171 - `"global"`
13471172
13481173 - `"not_available"`
from line 1178
13531178
13541179 Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).
13551180
1181 minimum: 1
1182
13561183- `models: optional array of string`
13571184
13581185 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
13591186
1187 maxItems: 100
1188
13601189- `page: optional string`
13611190
13621191 Opaque cursor from a previous response's `next_page` field.
from line 1194
13651194
13661195 Product surfaces to include. Defaults to all products. Use `group_by[]=product` to break out per-product values. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it.
13671196
1197 maxItems: 100
1198
13681199- `rbac_group_ids: optional array of string`
13691200
13701201 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
13711202
1203 maxItems: 100
1204
13721205- `slack_channel_ids: optional array of string`
13731206
13741207 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
13751208
1209 maxItems: 100
1210
13761211- `speeds: optional array of "fast" or "standard"`
13771212
13781213 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
13791214
1215 maxItems: 100
1216
13801217 - `"fast"`
13811218
13821219 - `"standard"`
from line 1222
13851222
13861223 Filter to specific users by tagged user ID.
13871224
1388### Returns
1389
1390- `CostBucket object { data, data_refreshed_at, has_more, 2 more }`
1391
1392 - `data: array of object { ending_at, results, starting_at }`
1225 maxItems: 100
1226
1227#### Returns
1228
1229- `CostBucket object`
1230
1231 - `data: array of object`
13931232
13941233 Time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no data (their `results` list is empty). A page holds at most `limit` buckets.
13951234
from line 1236
13971236
13981237 End of the time bucket (exclusive) in RFC 3339 format.
13991238
1400 - `results: array of object { amount, context_window, cost_type, 10 more }`
1239 format: date-time
1240
1241 - `results: array of object`
14011242
14021243 Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when `group_by[]` is omitted, or one row per group (subject to the per-bucket group cap described on the `group_by[]` parameter).
14031244
from line 1268
14271268
14281269 Currency code for the cost amount. Currently always `"USD"`.
14291270
1430 - `"USD"`
1271 default: USD
14311272
14321273 - `inference_geo: "global" or "us" or null`
14331274
from line 1328
14871328
14881329 Start of the time bucket (inclusive) in RFC 3339 format.
14891330
1331 format: date-time
1332
14901333 - `data_refreshed_at: string or null`
14911334
14921335 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case every bucket's `results` list is empty. Buckets beyond this watermark are incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
14931336
1337 format: date-time
1338
14941339 - `has_more: boolean`
14951340
14961341 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
from line 1348
15031348
15041349 ID of the Organization.
15051350
1506### Example
1507
1508```http
1351#### Example
1352
1353```bash
15091354curl https://api.anthropic.com/v1/organizations/analytics/cost_report \
15101355 -H 'anthropic-version: 2023-06-01' \
15111356 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
15121357```
15131358
1514#### Response
1359##### Response (200)
15151360
15161361```json
15171362{
from line 1390
15451390}
15461391```
15471392
1548## Get Per-User Cost
1549
1550**get** `/v1/organizations/analytics/user_cost_report`
1393### Get Per-User Cost
1394
1395**GET** `/v1/organizations/analytics/user_cost_report`
15511396
15521397Get per-user cost in USD across a date range.
15531398
from line 1404
15591404organizations on a Claude Enterprise plan. Requires an API key with the
15601405`read:analytics` scope.
15611406
1562### Query Parameters
1407#### Query parameters
15631408
15641409- `starting_at: string`
15651410
15661411 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
15671412
1413 format: date-time
1414
15681415- `bucket_width: optional "1d" or "1h" or "1m"`
15691416
15701417 Time-bucket granularity. When set, each row's `starting_at` and `ending_at` are populated and one actor may span several rows (one per time bucket with usage). The time bucket counts toward `limit`, so one page can return multiple rows for the same actor. `ending_at` is required when `bucket_width` is set, and with `bucket_width="1m"` the range may span at most 24 hours. When omitted, each row aggregates the full `[starting_at, ending_at)` range.
from line 1426
15791426
15801427 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
15811428
1429 maxItems: 100
1430
15821431 - `"0-200k"`
15831432
15841433 - `"200k-1M"`
from line 1436
15871436
15881437 End of range, exclusive. When omitted, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
15891438
1439 format: date-time
1440
15901441- `exclude_deleted_users: optional boolean`
15911442
15921443 If true, omit rows for users who are deleted (`deleted: true`). A page may contain fewer than `limit` rows; use `has_more` and `next_page` to paginate as usual.
15931444
1445 default: false
1446
15941447- `group_by: optional array of "context_window" or "cost_type" or "inference_geo" or 6 more`
15951448
15961449 Break each actor's row out by the given dimensions. Accepts the same values as the bucketed `/cost_report` endpoint. The `product`, `model`, `context_window`, `inference_geo`, and `speed` dimensions — and the time bucket, when `bucket_width` is set — count toward `limit`. `cost_type` and `token_type` do not: `cost_type` returns one row per cost component (tokens, web search, code execution); `token_type` returns one row per token type, each with `cost_type: "tokens"`; combining both returns the per-token-type rows plus the web-search and code-execution rows. A page can therefore contain more rows than `limit` when `cost_type` or `token_type` is requested.
15971450
1451 maxItems: 100
1452
15981453 - `"context_window"`
15991454
16001455 - `"cost_type"`
from line 1472
16171472
16181473 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
16191474
1475 maxItems: 100
1476
16201477 - `"global"`
16211478
16221479 - `"not_available"`
from line 1484
16271484
16281485 Number of rows per page (1-1000, default 20). One row per actor unless `group_by[]` or `bucket_width` splits an actor across rows; `cost_type`/`token_type` fan-out rows (cost endpoint only) are the exception — they do not count toward this limit, so `data` can exceed it.
16291486
1487 default: 20, maximum: 1000, minimum: 1
1488
16301489- `models: optional array of string`
16311490
16321491 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
16331492
1493 maxItems: 100
1494
16341495- `order: optional "asc" or "desc"`
16351496
16361497 Sort direction. Defaults to `desc`.
16371498
1499 default: desc
1500
16381501 - `"asc"`
16391502
16401503 - `"desc"`
from line 1506
16431506
16441507 Metric to rank actors by. Defaults to `amount`.
16451508
1509 default: amount
1510
16461511 - `"amount"`
16471512
16481513 - `"list_amount"`
from line 1520
16551520
16561521 Product surfaces to include. Defaults to all products. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it.
16571522
1523 maxItems: 100
1524
16581525- `rbac_group_ids: optional array of string`
16591526
16601527 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
16611528
1529 maxItems: 100
1530
16621531- `slack_channel_ids: optional array of string`
16631532
16641533 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
16651534
1535 maxItems: 100
1536
16661537- `speeds: optional array of "fast" or "standard"`
16671538
16681539 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
16691540
1541 maxItems: 100
1542
16701543 - `"fast"`
16711544
16721545 - `"standard"`
from line 1548
16751548
16761549 Filter to specific users by tagged user ID.
16771550
1678### Returns
1679
1680- `UserCost object { data, data_refreshed_at, has_more, 2 more }`
1681
1682 - `data: array of object { actor, amount, context_window, 13 more }`
1551 maxItems: 100
1552
1553#### Returns
1554
1555- `UserCost object`
1556
1557 - `data: array of object`
16831558
16841559 Rows for this page, ranked by `order_by` in the `order` direction. One row per user, or several per user when `group_by[]` or `bucket_width` breaks that user's usage or cost out across rows. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
16851560
from line 1578
17031578
17041579 Actor type. Always `"user_actor"`.
17051580
1706 - `"user_actor"`
1707
17081581 - `user_id: string`
17091582
17101583 Tagged user ID.
from line 1608
17351608
17361609 Currency code for the cost amount. Currently always `"USD"`.
17371610
1738 - `"USD"`
1611 default: USD
17391612
17401613 - `ending_at: string or null`
17411614
17421615 End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to `starting_at` plus one `bucket_width`. Null unless `bucket_width` is set.
17431616
1617 format: date-time
1618
17441619 - `inference_geo: "global" or "us" or null`
17451620
17461621 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
from line 1660
17851660
17861661 Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless `bucket_width` is set; without `bucket_width`, each row aggregates the full requested range.
17871662
1663 format: date-time
1664
17881665 - `token_type: "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more or null`
17891666
17901667 Token type when cost_type=tokens; null otherwise.
from line 1680
18031680
18041681 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
18051682
1683 format: date-time
1684
18061685 - `has_more: boolean`
18071686
18081687 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
from line 1694
18151694
18161695 ID of the Organization.
18171696
1818### Example
1819
1820```http
1697#### Example
1698
1699```bash
18211700curl https://api.anthropic.com/v1/organizations/analytics/user_cost_report \
18221701 -H 'anthropic-version: 2023-06-01' \
18231702 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
18241703```
18251704
1826#### Response
1705##### Response (200)
18271706
18281707```json
18291708{
from line 1739
18601739}
18611740```
18621741
1863## Domain Types
1864
1865### Cost Bucket
1866
1867- `CostBucket object { data, data_refreshed_at, has_more, 2 more }`
1868
1869 - `data: array of object { ending_at, results, starting_at }`
1870
1871 Time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no data (their `results` list is empty). A page holds at most `limit` buckets.
1872
1873 - `ending_at: string`
1874
1875 End of the time bucket (exclusive) in RFC 3339 format.
1876
1877 - `results: array of object { amount, context_window, cost_type, 10 more }`
1878
1879 Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when `group_by[]` is omitted, or one row per group (subject to the per-bucket group cap described on the `group_by[]` parameter).
1880
1881 - `amount: string`
1882
1883 Amount (post-discount, pre-credit) in fractional cents.
1884
1885 - `context_window: "0-200k" or "200k-1M" or null`
1886
1887 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
1888
1889 - `"0-200k"`
1890
1891 - `"200k-1M"`
1892
1893 - `cost_type: "code_execution" or "tokens" or "web_search" or null`
1894
1895 Cost component when `group_by[]=cost_type`; null otherwise (amount is the combined total).
1896
1897 - `"code_execution"`
1898
1899 - `"tokens"`
1900
1901 - `"web_search"`
1902
1903 - `currency: "USD"`
1904
1905 Currency code for the cost amount. Currently always `"USD"`.
1906
1907 - `"USD"`
1908
1909 - `inference_geo: "global" or "us" or null`
1910
1911 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
1912
1913 - `"global"`
1914
1915 - `"us"`
1916
1917 - `list_amount: string`
1918
1919 List-price amount (pre-discount) in fractional cents.
1920
1921 - `model: string or null`
1922
1923 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-4-6`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
1924
1925 - `product: string or null`
1926
1927 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it. Some unattributed usage is reported as "other".
1928
1929 - `rbac_group_id: string or null`
1930
1931 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has ONE id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query with no group_by.
1932
1933 - `requests: number or null`
1934
1935 Number of API requests in this row's scope. Null when `group_by` includes `cost_type` or `token_type` (the count has no per-component attribution; read it from the ungrouped response). For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
1936
1937 - `slack_channel_id: string or null`
1938
1939 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
1940
1941 - `speed: "fast" or "standard" or null`
1942
1943 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
1944
1945 - `"fast"`
1946
1947 - `"standard"`
1948
1949 - `token_type: "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more or null`
1950
1951 Token type when `group_by[]=token_type` and `cost_type=tokens`; null otherwise.
1952
1953 - `"cache_creation.ephemeral_1h_input_tokens"`
1954
1955 - `"cache_creation.ephemeral_5m_input_tokens"`
1956
1957 - `"cache_read_input_tokens"`
1958
1959 - `"output_tokens"`
1960
1961 - `"uncached_input_tokens"`
1962
1963 - `starting_at: string`
1964
1965 Start of the time bucket (inclusive) in RFC 3339 format.
1966
1967 - `data_refreshed_at: string or null`
1968
1969 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case every bucket's `results` list is empty. Buckets beyond this watermark are incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
1970
1971 - `has_more: boolean`
1972
1973 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
1974
1975 - `next_page: string or null`
1976
1977 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
1978
1979 - `organization_id: string`
1980
1981 ID of the Organization.
1982
1983### User Cost
1984
1985- `UserCost object { data, data_refreshed_at, has_more, 2 more }`
1986
1987 - `data: array of object { actor, amount, context_window, 13 more }`
1988
1989 Rows for this page, ranked by `order_by` in the `order` direction. One row per user, or several per user when `group_by[]` or `bucket_width` breaks that user's usage or cost out across rows. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
1990
1991 - `actor: AnalyticsUserActor`
1992
1993 The user this row's usage or cost is attributed to. Always a `user_actor`.
1994
1995 - `deleted: boolean`
1996
1997 True when the user is no longer a member of the organization or its associated organizations: either their membership was removed (for example, deprovisioned via your identity provider) or the account itself has been deleted. The flag reflects organization membership, not account status. `name` and `email` stay populated for removed members; `name` is `"Deleted User"` and `email` null when the account has been deleted. The `user_id` is still populated for reconciliation.
1998
1999 - `email: string or null`
2000
2001 The user's email address, including for users who are no longer members of the organization or its associated organizations. Null when the account has been deleted (check `deleted`) and for system-minted service accounts, which have no person's mailbox behind them (check `name`).
2002
2003 - `name: string or null`
2004
2005 The user's current name, including for users who are no longer members of the organization or its associated organizations. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted. Rows for system-minted service accounts render the service name (for example, `"Claude Security"` for usage by Anthropic's security-patching service) or null.
2006
2007 - `type: "user_actor"`
2008
2009 Actor type. Always `"user_actor"`.
2010
2011 - `"user_actor"`
2012
2013 - `user_id: string`
2014
2015 Tagged user ID.
2016
2017 - `amount: string`
2018
2019 Amount (post-discount, pre-credit) in fractional cents (minor units).
2020
2021 - `context_window: "0-200k" or "200k-1M" or null`
2022
2023 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
2024
2025 - `"0-200k"`
2026
2027 - `"200k-1M"`
2028
2029 - `cost_type: "code_execution" or "tokens" or "web_search" or null`
2030
2031 Cost component breakdown; null when returning the combined total.
2032
2033 - `"code_execution"`
2034
2035 - `"tokens"`
2036
2037 - `"web_search"`
2038
2039 - `currency: "USD"`
2040
2041 Currency code for the cost amount. Currently always `"USD"`.
2042
2043 - `"USD"`
2044
2045 - `ending_at: string or null`
2046
2047 End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to `starting_at` plus one `bucket_width`. Null unless `bucket_width` is set.
2048
2049 - `inference_geo: "global" or "us" or null`
2050
2051 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
2052
2053 - `"global"`
2054
2055 - `"us"`
2056
2057 - `list_amount: string`
2058
2059 List-price amount (pre-discount) in fractional cents.
2060
2061 - `model: string or null`
2062
2063 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-4-6`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
2064
2065 - `product: string or null`
2066
2067 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include "chat", "claude_code", "cowork", "office_agent", "claude_in_chrome", "claude_design", and "claude-in-slack". "claude-in-slack" (with hyphens) is Claude Tag, the Claude product in Slack. A similarly spelled legacy value (underscores instead of hyphens) identifies the retiring v1 Slack chat bot and appears only for organizations that used it. Some unattributed usage is reported as "other".
2068
2069 - `rbac_group_id: string or null`
2070
2071 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has ONE id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query with no group_by.
2072
2073 - `requests: number or null`
2074
2075 Number of API requests in this row's scope. Null when `group_by` includes `cost_type` or `token_type` (the count has no per-component attribution; read it from the ungrouped response). For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
2076
2077 - `slack_channel_id: string or null`
2078
2079 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
2080
2081 - `speed: "fast" or "standard" or null`
2082
2083 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
2084
2085 - `"fast"`
2086
2087 - `"standard"`
2088
2089 - `starting_at: string or null`
2090
2091 Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless `bucket_width` is set; without `bucket_width`, each row aggregates the full requested range.
2092
2093 - `token_type: "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more or null`
2094
2095 Token type when cost_type=tokens; null otherwise.
2096
2097 - `"cache_creation.ephemeral_1h_input_tokens"`
2098
2099 - `"cache_creation.ephemeral_5m_input_tokens"`
2100
2101 - `"cache_read_input_tokens"`
2102
2103 - `"output_tokens"`
2104
2105 - `"uncached_input_tokens"`
2106
2107 - `data_refreshed_at: string or null`
2108
2109 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours but not final until about 30 days after the usage date (late-arriving events, reconciliation adjustments).
2110
2111 - `has_more: boolean`
2112
2113 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
2114
2115 - `next_page: string or null`
2116
2117 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
2118
2119 - `organization_id: string`
2120
2121 ID of the Organization.
2122
2123# Users
2124
2125## List User Activity
2126
2127**get** `/v1/organizations/analytics/users`
1742## Analytics › Users
1743
1744### List User Activity
1745
1746**GET** `/v1/organizations/analytics/users`
21281747
21291748Get per-user activity for a given day, with cursor-based pagination.
21301749
from line 1753
21341753to organizations on a Claude Enterprise plan. Requires an API key with
21351754the `read:analytics` scope.
21361755
2137### Query Parameters
1756#### Query parameters
21381757
21391758- `date: optional string`
21401759
21411760 UTC date in YYYY-MM-DD format. The day to get user activity for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
21421761
1762 format: date
1763
21431764- `ending_date: optional string`
21441765
21451766 UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days after starting_date.
21461767
1768 format: date
1769
21471770- `filter: optional array of string`
21481771
21491772 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: project_id, rbac_group_id, user_id. Value forms: project_id takes a tagged project id (claude_proj_...) and scopes each member's row to their claude.ai chat activity within that project (it cannot be combined with group_by[] or an rbac_group_id filter); rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
21501773
1774 maxItems: 100
1775
21511776- `group_by: optional array of "rbac_group_id"`
21521777
21531778 Dimensions to break results out by (e.g. group_by[]=rbac_group_id). Supported on this endpoint: rbac_group_id. Rows are already per-member, so the one supported grouping aggregates them per RBAC group instead. Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses via next_page; an unsupported dimension returns 400. rbac_group_id attributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
21541779
2155 - `"rbac_group_id"`
1780 maxItems: 100
21561781
21571782- `limit: optional number`
21581783
21591784 Number of results per page (1-1000, default 100).
21601785
1786 minimum: 1, maximum: 1000
1787
21611788- `order: optional "asc" or "desc"`
21621789
21631790 Sort direction: 'asc' or 'desc'. Defaults to 'asc' for the endpoint's sort column and to 'desc' when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.
from line 1805
21781805
21791806 UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either date or starting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
21801807
2181### Returns
2182
2183- `UserActivity object { data, next_page }`
1808 format: date
1809
1810#### Returns
1811
1812- `UserActivity object`
21841813
21851814 Response for GET /v1/organizations/analytics/users.
21861815
2187 - `data: array of object { chat_metrics, claude_code_metrics, cowork_metrics, 9 more }`
2188
2189 - `chat_metrics: object { connectors_used_count, distinct_artifacts_created_count, distinct_connectors_used_count, 9 more }`
1816 - `data: array of object`
1817
1818 - `chat_metrics: object`
21901819
21911820 Claude.ai activity metrics for a single user on a given day.
21921821
from line 1867
22381867
22391868 Number of messages that used extended thinking
22401869
2241 - `claude_code_metrics: object { core_metrics, tool_actions }`
1870 - `claude_code_metrics: object`
22421871
22431872 Claude Code activity metrics for a single user on a given day.
22441873
2245 - `core_metrics: object { commit_count, distinct_session_count, lines_of_code, pull_request_count }`
1874 - `core_metrics: object`
22461875
22471876 Core Claude Code activity metrics for a single user on a given day.
22481877
from line 1883
22541883
22551884 Number of distinct Claude Code sessions. On aggregated rows and in date-range mode: summed per-day distinct counts. A session essentially never spans a UTC day, so the sum is in practice the true distinct count.
22561885
2257 - `lines_of_code: object { added_count, removed_count }`
1886 - `lines_of_code: object`
22581887
22591888 Lines of code added and removed via Claude Code.
22601889
from line 1899
22701899
22711900 Number of pull requests created via Claude Code
22721901
2273 - `tool_actions: object { edit_tool, multi_edit_tool, notebook_edit_tool, write_tool }`
1902 - `tool_actions: object`
22741903
22751904 Per-tool accepted/rejected counts for Claude Code file modification tools.
22761905
from line 1927
22981927
22991928 Accepted/rejected counts for a single Claude Code tool type.
23001929
2301 - `cowork_metrics: object { action_count, connectors_used_count, dispatch_turn_count, 13 more }`
1930 - `cowork_metrics: object`
23021931
23031932 Cowork activity metrics for a single user on a given day.
23041933
from line 1995
23661995
23671996 Number of successful Write tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
23681997
2369 - `design_metrics: object { distinct_projects_created_count, distinct_projects_used_count, distinct_session_count, message_count }`
1998 - `design_metrics: object`
23701999
23712000 Claude Design activity metrics for a single user on a given day.
23722001
from line 2015
23862015
23872016 Number of messages sent in Claude Design sessions
23882017
2389 - `office_metrics: object { excel, outlook, powerpoint, word }`
2018 - `office_metrics: object`
23902019
23912020 Office Agent activity metrics for a single user on a given day, broken out by Office product.
23922021
from line 2059
24302059
24312060 Office Agent activity metrics for a single user on a given day within one Office product.
24322061
2433 - `science_metrics: object { delegation_count, distinct_session_count, message_count, 2 more }`
2062 - `science_metrics: object`
24342063
24352064 Claude Science activity metrics for a single user on a given day.
24362065
from line 2119
24902119
24912120 Object type. Always `user`.
24922121
2493 - `"user"`
2122 default: user
24942123
24952124 - `next_page: string or null`
24962125
24972126 Opaque cursor for the next page, or null if no more results
24982127
2499### Example
2500
2501```http
2128#### Example
2129
2130```bash
25022131curl https://api.anthropic.com/v1/organizations/analytics/users \
25032132 -H 'anthropic-version: 2023-06-01' \
25042133 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
25052134```
25062135
2507#### Response
2136##### Response (200)
25082137
25092138```json
25102139{
from line 2263
26342263}
26352264```
26362265
2637## Domain Types
2638
2639### User Activity
2640
2641- `UserActivity object { data, next_page }`
2642
2643 Response for GET /v1/organizations/analytics/users.
2644
2645 - `data: array of object { chat_metrics, claude_code_metrics, cowork_metrics, 9 more }`
2646
2647 - `chat_metrics: object { connectors_used_count, distinct_artifacts_created_count, distinct_connectors_used_count, 9 more }`
2648
2649 Claude.ai activity metrics for a single user on a given day.
2650
2651 - `connectors_used_count: number`
2652
2653 Number of MCP connector invocations.
2654
2655 - `distinct_artifacts_created_count: number`
2656
2657 Number of distinct artifacts created. Exact in date-range mode: a creation belongs to exactly one day, so the per-day counts never overlap and their sum over the window is the exact count of distinct creations in it.
2658
2659 - `distinct_connectors_used_count: number or null`
2660
2661 Distinct claude.ai connectors this user used. Excludes calls whose connector could not be identified and all calls from organizations with zero data retention. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2662
2663 - `distinct_conversation_count: number or null`
2664
2665 Number of distinct conversations the user participated in. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2666
2667 - `distinct_files_uploaded_count: number or null`
2668
2669 Number of distinct files uploaded. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2670
2671 - `distinct_projects_created_count: number`
2672
2673 Number of distinct projects created. Exact in date-range mode: a creation belongs to exactly one day, so the per-day counts never overlap and their sum over the window is the exact count of distinct creations in it.
2674
2675 - `distinct_projects_used_count: number or null`
2676
2677 Number of distinct projects used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2678
2679 - `distinct_shared_artifacts_viewed_count: number or null`
2680
2681 Number of distinct shared artifacts the user viewed. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2682
2683 - `distinct_skills_used_count: number or null`
2684
2685 Number of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2686
2687 - `message_count: number`
2688
2689 Number of messages sent
2690
2691 - `shared_conversations_viewed_count: number`
2692
2693 Number of times the user opened a shared conversation in a project
2694
2695 - `thinking_message_count: number`
2696
2697 Number of messages that used extended thinking
2698
2699 - `claude_code_metrics: object { core_metrics, tool_actions }`
2700
2701 Claude Code activity metrics for a single user on a given day.
2702
2703 - `core_metrics: object { commit_count, distinct_session_count, lines_of_code, pull_request_count }`
2704
2705 Core Claude Code activity metrics for a single user on a given day.
2706
2707 - `commit_count: number`
2708
2709 Number of commits made via Claude Code
2710
2711 - `distinct_session_count: number or null`
2712
2713 Number of distinct Claude Code sessions. On aggregated rows and in date-range mode: summed per-day distinct counts. A session essentially never spans a UTC day, so the sum is in practice the true distinct count.
2714
2715 - `lines_of_code: object { added_count, removed_count }`
2716
2717 Lines of code added and removed via Claude Code.
2718
2719 - `added_count: number`
2720
2721 Lines of code added
2722
2723 - `removed_count: number`
2724
2725 Lines of code removed
2726
2727 - `pull_request_count: number`
2728
2729 Number of pull requests created via Claude Code
2730
2731 - `tool_actions: object { edit_tool, multi_edit_tool, notebook_edit_tool, write_tool }`
2732
2733 Per-tool accepted/rejected counts for Claude Code file modification tools.
2734
2735 - `edit_tool: ToolActionCounts`
2736
2737 Accepted/rejected counts for a single Claude Code tool type.
2738
2739 - `accepted_count: number`
2740
2741 Number of tool proposals accepted
2742
2743 - `rejected_count: number`
2744
2745 Number of tool proposals rejected
2746
2747 - `multi_edit_tool: ToolActionCounts`
2748
2749 Accepted/rejected counts for a single Claude Code tool type.
2750
2751 - `notebook_edit_tool: ToolActionCounts`
2752
2753 Accepted/rejected counts for a single Claude Code tool type.
2754
2755 - `write_tool: ToolActionCounts`
2756
2757 Accepted/rejected counts for a single Claude Code tool type.
2758
2759 - `cowork_metrics: object { action_count, connectors_used_count, dispatch_turn_count, 13 more }`
2760
2761 Cowork activity metrics for a single user on a given day.
2762
2763 - `action_count: number`
2764
2765 Number of tool actions completed in Cowork sessions
2766
2767 - `connectors_used_count: number`
2768
2769 Total number of connector invocations in Cowork sessions
2770
2771 - `dispatch_turn_count: number`
2772
2773 Number of Dispatch (background agent) turns completed
2774
2775 - `distinct_connectors_used_count: number or null`
2776
2777 Number of distinct connectors used in Cowork sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2778
2779 - `distinct_session_count: number or null`
2780
2781 Number of distinct Cowork sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2782
2783 - `distinct_skills_used_count: number or null`
2784
2785 Number of distinct skills used in Cowork sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2786
2787 - `message_count: number`
2788
2789 Number of messages sent in Cowork sessions
2790
2791 - `skills_used_count: number`
2792
2793 Total number of skill invocations in Cowork sessions
2794
2795 - `distinct_plugins_used_count: optional number or null`
2796
2797 Number of distinct plugins used in Cowork sessions. Null while Cowork plugin-use metrics are not enabled for this organization. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2798
2799 - `edit_tool_count: optional number or null`
2800
2801 Number of successful Edit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
2802
2803 - `file_edit_count: optional number or null`
2804
2805 Number of successful file-edit tool calls (Edit, MultiEdit, Write, NotebookEdit) in Cowork sessions. Null, never 0, while the file-edit metrics are not enabled for this organization.
2806
2807 - `multi_edit_tool_count: optional number or null`
2808
2809 Number of successful MultiEdit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
2810
2811 - `notebook_edit_tool_count: optional number or null`
2812
2813 Number of successful NotebookEdit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
2814
2815 - `plugins_used_count: optional number or null`
2816
2817 Total number of plugin invocations in Cowork sessions. Null while Cowork plugin-use metrics are not enabled for this organization.
2818
2819 - `sessions_with_file_edits_count: optional number or null`
2820
2821 Number of distinct Cowork sessions with at least one successful file-edit tool call. Null while the file-edit metrics are not enabled for this organization. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2822
2823 - `write_tool_count: optional number or null`
2824
2825 Number of successful Write tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
2826
2827 - `design_metrics: object { distinct_projects_created_count, distinct_projects_used_count, distinct_session_count, message_count }`
2828
2829 Claude Design activity metrics for a single user on a given day.
2830
2831 - `distinct_projects_created_count: number`
2832
2833 Number of distinct Claude Design projects created. Exact in date-range mode: a creation belongs to exactly one day, so the per-day counts never overlap and their sum over the window is the exact count of distinct creations in it.
2834
2835 - `distinct_projects_used_count: number or null`
2836
2837 Number of distinct Claude Design projects the user worked in. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2838
2839 - `distinct_session_count: number or null`
2840
2841 Number of distinct Claude Design sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2842
2843 - `message_count: number`
2844
2845 Number of messages sent in Claude Design sessions
2846
2847 - `office_metrics: object { excel, outlook, powerpoint, word }`
2848
2849 Office Agent activity metrics for a single user on a given day, broken out by Office product.
2850
2851 - `excel: OfficeProductMetrics`
2852
2853 Office Agent activity metrics for a single user on a given day within one Office product.
2854
2855 - `connectors_used_count: number`
2856
2857 Number of MCP connector invocations
2858
2859 - `distinct_connectors_used_count: number or null`
2860
2861 Number of distinct MCP connectors used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2862
2863 - `distinct_session_count: number or null`
2864
2865 Number of distinct Office Agent sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2866
2867 - `distinct_skills_used_count: number or null`
2868
2869 Number of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2870
2871 - `message_count: number`
2872
2873 Number of messages sent
2874
2875 - `skills_used_count: number`
2876
2877 Number of skill invocations
2878
2879 - `outlook: OfficeProductMetrics`
2880
2881 Office Agent activity metrics for a single user on a given day within one Office product.
2882
2883 - `powerpoint: OfficeProductMetrics`
2884
2885 Office Agent activity metrics for a single user on a given day within one Office product.
2886
2887 - `word: OfficeProductMetrics`
2888
2889 Office Agent activity metrics for a single user on a given day within one Office product.
2890
2891 - `science_metrics: object { delegation_count, distinct_session_count, message_count, 2 more }`
2892
2893 Claude Science activity metrics for a single user on a given day.
2894
2895 - `delegation_count: number`
2896
2897 Number of delegations (handoffs to a specialized agent) in Claude Science sessions
2898
2899 - `distinct_session_count: number or null`
2900
2901 Number of distinct Claude Science sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
2902
2903 - `message_count: number`
2904
2905 Number of messages sent in Claude Science sessions
2906
2907 - `remote_compute_job_count: number`
2908
2909 Number of remote compute jobs launched from Claude Science sessions
2910
2911 - `skills_used_count: number`
2912
2913 Total number of skill invocations in Claude Science sessions
2914
2915 - `web_search_count: number`
2916
2917 Number of web searches performed
2918
2919 - `distinct_user_count: optional number or null`
2920
2921 Number of distinct active users represented by this row. Only set for grouped rollups (`group_by[]`); null for per-user rows. In date-range mode, recomputed as an exact distinct count of the group's active members over the requested window, never a sum of per-day values.
2922
2923 - `last_activity_date: optional string or null`
2924
2925 Most recent UTC day (YYYY-MM-DD) on which the user had any counted activity, within the requested window: equal to the requested date in single-day mode, and to the latest active day in [starting_date, ending_date) in date-range rollup mode — never a day earlier than the window start. On filtered requests (`filter[]`) only days matching the filter count: with `filter[]=rbac_group_id` it is the last day the user was active while a member of that group, consistent with the row's other metrics. Null on grouped (`group_by[]`) rows. Omitted from the response while last-activity reporting is not enabled for this organization.
2926
2927 - `rbac_group_id: optional string or null`
2928
2929 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
2930
2931 - `rbac_group_name: optional string or null`
2932
2933 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
2934
2935 - `user: optional AnalyticsUser or null`
2936
2937 User identifier.
2938
2939 - `id: string`
2940
2941 Tagged user identifier (e.g. `user_...`)
2942
2943 - `email_address: string`
2944
2945 Email address of the user
2946
2947 - `type: optional "user"`
2948
2949 Object type. Always `user`.
2950
2951 - `"user"`
2952
2953 - `next_page: string or null`
2954
2955 Opaque cursor for the next page, or null if no more results
2956
2957# Skills
2958
2959## Get Skill Usage
2960
2961**get** `/v1/organizations/analytics/skills`
2266## Analytics › Skills
2267
2268### Get Skill Usage
2269
2270**GET** `/v1/organizations/analytics/skills`
29622271
29632272Get per-skill usage for a given day, with cursor-based pagination.
29642273
from line 2278
29692278on a Claude Enterprise plan. Requires an API key with the
29702279`read:analytics` scope.
29712280
2972### Query Parameters
2281#### Query parameters
29732282
29742283- `date: optional string`
29752284
29762285 UTC date in YYYY-MM-DD format. The day to get skill usage for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
29772286
2287 format: date
2288
29782289- `ending_date: optional string`
29792290
29802291 UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days after starting_date.
29812292
2293 format: date
2294
29822295- `filter: optional array of string`
29832296
29842297 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: product, rbac_group_id, share_status, skill_name, user_id. Value forms: product is one of chat, claude_code, cowork, or office_agent; rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); share_status is one of organization, private, or public; skill_name matches case-insensitively; user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
29852298
2299 maxItems: 100
2300
29862301- `group_by: optional array of "product" or "rbac_group_id" or "user_id"`
29872302
29882303 Dimensions to break results out by (e.g. group_by[]=user_id). Supported on this endpoint: product, rbac_group_id, user_id. Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses via next_page; an unsupported dimension returns 400. rbac_group_id attributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
29892304
2305 maxItems: 100
2306
29902307 - `"product"`
29912308
29922309 - `"rbac_group_id"`
from line 2314
29972314
29982315 Number of results per page (1-1000, default 100).
29992316
2317 minimum: 1, maximum: 1000
2318
30002319- `order: optional "asc" or "desc"`
30012320
30022321 Sort direction: 'asc' or 'desc'. Defaults to 'asc' for the endpoint's sort column and to 'desc' when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.
from line 2336
30172336
30182337 UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either date or starting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
30192338
3020### Returns
3021
3022- `SkillUsage object { data, next_page }`
2339 format: date
2340
2341#### Returns
2342
2343- `SkillUsage object`
30232344
30242345 Response for GET /v1/organizations/analytics/skills.
30252346
3026 - `data: array of object { chat_metrics, claude_code_metrics, cowork_metrics, 14 more }`
3027
3028 - `chat_metrics: object { distinct_conversation_skill_used_count }`
2347 - `data: array of object`
2348
2349 - `chat_metrics: object`
30292350
30302351 Claude.ai activity metrics for a single skill on a given day.
30312352
from line 2354
30332354
30342355 Number of distinct conversations in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
30352356
3036 - `claude_code_metrics: object { distinct_session_skill_used_count }`
2357 - `claude_code_metrics: object`
30372358
30382359 Claude Code activity metrics for a single skill on a given day.
30392360
from line 2362
30412362
30422363 Number of distinct Claude Code sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
30432364
3044 - `cowork_metrics: object { distinct_session_skill_used_count }`
2365 - `cowork_metrics: object`
30452366
30462367 Cowork activity metrics for a single skill on a given day.
30472368
from line 2374
30532374
30542375 Number of distinct users who used the skill on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted.
30552376
3056 - `office_metrics: object { excel, outlook, powerpoint, word }`
2377 - `office_metrics: object`
30572378
30582379 Office Agent activity metrics for a single skill on a given day, broken out by Office product.
30592380
from line 2410
30892410
30902411 Currency for this row's monetary fields (estimated_overage_spend and attributed_list_price), as an uppercase ISO-4217 code. Always "USD" when either amount is populated; null whenever both amounts are null.
30912412
3092 - `"USD"`
3093
30942413 - `enable_count: optional number or null`
30952414
30962415 Distinct accounts that enabled this skill on the requested day (claude.ai only — the skill analog of plugin install_count). The count is org-wide: null when enable reporting is not enabled for this organization, or when the request scopes to `user_id` / `rbac_group_id` / `product` via `group_by[]` or `filter[]` (an org-wide count would be misleading on per-cut rows). A distinct count, not an event count: summing across days double-counts members who enable the skill on more than one day, so it is also null in date-range rollup mode (starting_date/ending_date).
from line 2450
31312450
31322451 Opaque cursor for the next page, or null if no more results
31332452
3134### Example
3135
3136```http
2453#### Example
2454
2455```bash
31372456curl https://api.anthropic.com/v1/organizations/analytics/skills \
31382457 -H 'anthropic-version: 2023-06-01' \
31392458 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
31402459```
31412460
3142#### Response
2461##### Response (200)
31432462
31442463```json
31452464{
from line 2506
31872506}
31882507```
31892508
3190## Domain Types
3191
3192### Skill Usage
3193
3194- `SkillUsage object { data, next_page }`
3195
3196 Response for GET /v1/organizations/analytics/skills.
3197
3198 - `data: array of object { chat_metrics, claude_code_metrics, cowork_metrics, 14 more }`
3199
3200 - `chat_metrics: object { distinct_conversation_skill_used_count }`
3201
3202 Claude.ai activity metrics for a single skill on a given day.
3203
3204 - `distinct_conversation_skill_used_count: number or null`
3205
3206 Number of distinct conversations in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3207
3208 - `claude_code_metrics: object { distinct_session_skill_used_count }`
3209
3210 Claude Code activity metrics for a single skill on a given day.
3211
3212 - `distinct_session_skill_used_count: number or null`
3213
3214 Number of distinct Claude Code sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3215
3216 - `cowork_metrics: object { distinct_session_skill_used_count }`
3217
3218 Cowork activity metrics for a single skill on a given day.
3219
3220 - `distinct_session_skill_used_count: number or null`
3221
3222 Number of distinct Cowork sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3223
3224 - `distinct_user_count: number`
3225
3226 Number of distinct users who used the skill on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted.
3227
3228 - `office_metrics: object { excel, outlook, powerpoint, word }`
3229
3230 Office Agent activity metrics for a single skill on a given day, broken out by Office product.
3231
3232 - `excel: SkillOfficeProductMetrics`
3233
3234 Office Agent activity metrics for a single skill on a given day within one Office product.
3235
3236 - `distinct_session_skill_used_count: number or null`
3237
3238 Number of distinct Office Agent sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3239
3240 - `outlook: SkillOfficeProductMetrics`
3241
3242 Office Agent activity metrics for a single skill on a given day within one Office product.
3243
3244 - `powerpoint: SkillOfficeProductMetrics`
3245
3246 Office Agent activity metrics for a single skill on a given day within one Office product.
3247
3248 - `word: SkillOfficeProductMetrics`
3249
3250 Office Agent activity metrics for a single skill on a given day within one Office product.
3251
3252 - `skill_name: string`
3253
3254 Name of the skill
3255
3256 - `attributed_list_price: optional string or null`
3257
3258 List-price (rate-card) value of the member requests attributed to this skill, as a decimal string in the minor unit of `currency` (cents for USD), from Claude Code, Cowork, and Office Agent request-level attribution — the value of requests that INVOLVED the skill, not the skill's incremental cost. Unlike estimated_overage_spend this reflects usage value regardless of how it was funded — seat-covered usage counts — but it is undiscounted and does NOT tie to billed spend or the organization's spend reporting. claude.ai chat usage carries no request-level attribution and contributes nothing: the field is null on chat product rows and on office_agent product cuts dated before 2026-06-18 (the Office Agent attribution data-start), and on ungrouped rows it covers the Claude Code + Cowork + Office Agent share only (null when no attributable usage exists). Also null under the same conditions as estimated_overage_spend (spend reporting not enabled for this organization, office_agent product cuts before the 2026-06-18 data-start). "0" means attributable usage existed but none was attributed to this skill. Addable across days: date-range rollup mode returns the window's sum. On `group_by[]` and `filter[]` shapes both amounts can total below the ungrouped value for the same skill over the same date or range: spend attributed to a member–skill pair with no counted usage on that day is excluded from those cuts.
3259
3260 - `currency: optional "USD" or null`
3261
3262 Currency for this row's monetary fields (estimated_overage_spend and attributed_list_price), as an uppercase ISO-4217 code. Always "USD" when either amount is populated; null whenever both amounts are null.
3263
3264 - `"USD"`
3265
3266 - `enable_count: optional number or null`
3267
3268 Distinct accounts that enabled this skill on the requested day (claude.ai only — the skill analog of plugin install_count). The count is org-wide: null when enable reporting is not enabled for this organization, or when the request scopes to `user_id` / `rbac_group_id` / `product` via `group_by[]` or `filter[]` (an org-wide count would be misleading on per-cut rows). A distinct count, not an event count: summing across days double-counts members who enable the skill on more than one day, so it is also null in date-range rollup mode (starting_date/ending_date).
3269
3270 - `estimated_overage_spend: optional string or null`
3271
3272 Estimated OVERAGE spend attributed to this skill, as a decimal string in the minor unit of `currency` (cents for USD; "1250" is $12.50, fractional cents possible) — an allocation of each member's daily post-discount, pre-credit metered overage spend (the same cost basis as the organization's spend reporting and the Cost & Usage API, so per-skill figures are directly comparable; spend with no skill attribution — including any member-day without skill invocations — is not represented, so skill rows sum to at most those totals) across the skills the member used. Overage only: usage covered by included seat allowances bills nothing and allocates $0 here — see attributed_list_price for the funding-independent usage-value companion. Claude Code, Cowork, and Office Agent spend use request-level skill attribution; claude.ai chat spend is approximated proportionally to skill-invoking messages. An estimate, not a billing number — and the cost of the requests/messages that INVOLVED the skill, not the skill's incremental cost (the same request would still have cost something without the skill active). "0" means no overage spend was attributed; null when spend reporting is not enabled for this organization, on office_agent product cuts dated before 2026-06-18 (the Office Agent attribution data-start). Addable across days: date-range rollup mode (starting_date/ending_date) returns the window's sum. With `group_by[]=user_id` each row carries the user's own attributed spend. On `group_by[]` and `filter[]` shapes both amounts can total below the ungrouped value for the same skill over the same date or range: spend attributed to a member–skill pair with no counted usage on that day is excluded from those cuts.
3273
3274 - `invocation_count: optional number or null`
3275
3276 Total number of times this skill was invoked on the requested day (the skill analog of plugin invocation_count). Unlike distinct_user_count — which answers '\# of users' — this is the true '# of uses'. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Null when invocation reporting is not enabled for this organization. Sum across a date range for total uses in the window — date-range rollup mode (starting_date/ending_date) returns this sum directly.
3277
3278 - `product: optional string or null`
3279
3280 Product that produced this row's activity: one of chat, claude_code, cowork, or office_agent (the canonical Cost & Usage product naming; an office_agent row's per-surface breakdown is in its office_metrics). On /plugins only cowork and claude_code occur (the only surfaces with plugin attribution); /artifacts and /apps/chat/projects do not support the product dimension (a product `group_by[]` or `filter[]` there is rejected). Present only when the request grouped by product.
3281
3282 - `rbac_group_id: optional string or null`
3283
3284 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
3285
3286 - `rbac_group_name: optional string or null`
3287
3288 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
3289
3290 - `share_status: optional string or null`
3291
3292 Skill share status (claude.ai only): one of 'private', 'organization', or 'public'. Null for skills used only in Claude Code or Office (no per-skill share-status concept) and when share-status reporting is not yet available for the organization. Filterable via `filter[]=share_status:<value>`.
3293
3294 - `skill_display_name: optional string or null`
3295
3296 Human-readable display name for rows whose skill_name is an opaque skill id (user/organization skill types — user-defined names are withheld from the analytics pipeline). Only organization-shared skills resolve; the literal 'unknown' bucket row also gets a fixed 'Unknown skill' label. Null for private (user-defined) skills — their names are not disclosed to analytics-key holders — and null when skill_name is already a display name, when the skill was deleted, or when display-name resolution is not enabled for this organization.
3297
3298 - `user_id: optional string or null`
3299
3300 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
3301
3302 - `next_page: string or null`
3303
3304 Opaque cursor for the next page, or null if no more results
3305
3306# Connectors
3307
3308## Get Connector Usage
3309
3310**get** `/v1/organizations/analytics/connectors`
2509## Analytics › Connectors
2510
2511### Get Connector Usage
2512
2513**GET** `/v1/organizations/analytics/connectors`
33112514
33122515Get per-connector usage for a given day, with cursor-based pagination.
33132516
from line 2523
33202523organizations on a Claude Enterprise plan. Requires an API key with the
33212524`read:analytics` scope.
33222525
3323### Query Parameters
2526#### Query parameters
33242527
33252528- `date: optional string`
33262529
33272530 UTC date in YYYY-MM-DD format. The day to get connector usage for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
33282531
2532 format: date
2533
33292534- `ending_date: optional string`
33302535
33312536 UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days after starting_date.
33322537
2538 format: date
2539
33332540- `filter: optional array of string`
33342541
33352542 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: connector_name, product, rbac_group_id, user_id. Value forms: connector_name matches case-insensitively, a display name such as 'GitHub MCP' also matches its normalized stored form ('github'), and for rows whose connector_name is an opaque connector id the connector's display name (connector_display_name) also matches; product is one of chat, claude_code, cowork, or office_agent; rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
33362543
2544 maxItems: 100
2545
33372546- `group_by: optional array of "product" or "rbac_group_id" or "user_id"`
33382547
33392548 Dimensions to break results out by (e.g. group_by[]=user_id). Supported on this endpoint: product, rbac_group_id, user_id. Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses via next_page; an unsupported dimension returns 400. rbac_group_id attributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
33402549
2550 maxItems: 100
2551
33412552 - `"product"`
33422553
33432554 - `"rbac_group_id"`
from line 2559
33482559
33492560 Number of results per page (1-1000, default 100).
33502561
2562 minimum: 1, maximum: 1000
2563
33512564- `order: optional "asc" or "desc"`
33522565
33532566 Sort direction: 'asc' or 'desc'. Defaults to 'asc' for the endpoint's sort column and to 'desc' when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.
from line 2581
33682581
33692582 UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either date or starting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
33702583
3371### Returns
3372
3373- `ConnectorUsage object { data, next_page }`
2584 format: date
2585
2586#### Returns
2587
2588- `ConnectorUsage object`
33742589
33752590 Response for GET /v1/organizations/analytics/connectors.
33762591
3377 - `data: array of object { chat_metrics, claude_code_metrics, connector_name, 13 more }`
3378
3379 - `chat_metrics: object { distinct_conversation_connector_used_count }`
2592 - `data: array of object`
2593
2594 - `chat_metrics: object`
33802595
33812596 Claude.ai activity metrics for a single connector on a given day.
33822597
from line 2599
33842599
33852600 Number of distinct conversations in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
33862601
3387 - `claude_code_metrics: object { distinct_session_connector_used_count }`
2602 - `claude_code_metrics: object`
33882603
33892604 Claude Code activity metrics for a single connector on a given day.
33902605
from line 2611
33962611
33972612 Name of the connector. Some rows carry an opaque connector id here instead of a readable name; connector_display_name holds the resolved name for those rows.
33982613
3399 - `cowork_metrics: object { distinct_session_connector_used_count }`
2614 - `cowork_metrics: object`
34002615
34012616 Cowork activity metrics for a single connector on a given day.
34022617
from line 2623
34082623
34092624 Number of distinct users who used the connector on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
34102625
3411 - `office_metrics: object { excel, outlook, powerpoint, word }`
2626 - `office_metrics: object`
34122627
34132628 Office Agent activity metrics for a single connector on a given day, broken out by Office product.
34142629
from line 2691
34762691
34772692 Opaque cursor for the next page, or null if no more results
34782693
3479### Example
3480
3481```http
2694#### Example
2695
2696```bash
34822697curl https://api.anthropic.com/v1/organizations/analytics/connectors \
34832698 -H 'anthropic-version: 2023-06-01' \
34842699 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
34852700```
34862701
3487#### Response
2702##### Response (200)
34882703
34892704```json
34902705{
from line 2746
35312746}
35322747```
35332748
3534## Domain Types
3535
3536### Connector Usage
3537
3538- `ConnectorUsage object { data, next_page }`
3539
3540 Response for GET /v1/organizations/analytics/connectors.
3541
3542 - `data: array of object { chat_metrics, claude_code_metrics, connector_name, 13 more }`
3543
3544 - `chat_metrics: object { distinct_conversation_connector_used_count }`
3545
3546 Claude.ai activity metrics for a single connector on a given day.
3547
3548 - `distinct_conversation_connector_used_count: number or null`
3549
3550 Number of distinct conversations in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3551
3552 - `claude_code_metrics: object { distinct_session_connector_used_count }`
3553
3554 Claude Code activity metrics for a single connector on a given day.
3555
3556 - `distinct_session_connector_used_count: number or null`
3557
3558 Number of distinct Claude Code sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3559
3560 - `connector_name: string`
3561
3562 Name of the connector. Some rows carry an opaque connector id here instead of a readable name; connector_display_name holds the resolved name for those rows.
3563
3564 - `cowork_metrics: object { distinct_session_connector_used_count }`
3565
3566 Cowork activity metrics for a single connector on a given day.
3567
3568 - `distinct_session_connector_used_count: number or null`
3569
3570 Number of distinct Cowork sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3571
3572 - `distinct_user_count: number`
3573
3574 Number of distinct users who used the connector on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
3575
3576 - `office_metrics: object { excel, outlook, powerpoint, word }`
3577
3578 Office Agent activity metrics for a single connector on a given day, broken out by Office product.
3579
3580 - `excel: ConnectorOfficeProductMetrics`
3581
3582 Office Agent activity metrics for a single connector on a given day within one Office product.
3583
3584 - `distinct_session_connector_used_count: number or null`
3585
3586 Number of distinct Office Agent sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
3587
3588 - `outlook: ConnectorOfficeProductMetrics`
3589
3590 Office Agent activity metrics for a single connector on a given day within one Office product.
3591
3592 - `powerpoint: ConnectorOfficeProductMetrics`
3593
3594 Office Agent activity metrics for a single connector on a given day within one Office product.
3595
3596 - `word: ConnectorOfficeProductMetrics`
3597
3598 Office Agent activity metrics for a single connector on a given day within one Office product.
3599
3600 - `connector_display_name: optional string or null`
3601
3602 Human-readable display name for rows whose connector_name is an opaque connector id rather than a readable name, resolved at request time from the organization's connectors (including connectors that have since been removed). connector_name remains the row's stable key for sorting and pagination, and filter[]=connector_name:<value> also matches these rows by display name. Display names are not unique, and the same connector's claude.ai usage can appear under a separate row with a readable connector_name. Null when connector_name is already a readable name, when the id cannot be resolved to one of the organization's connectors, or when display-name resolution is not enabled for this organization.
3603
3604 - `individual_auth_distinct_user_count: optional number or null`
3605
3606 Number of distinct users whose use of this connector on the requested day ran on their own individual credential, connected through their own consent flow. Companion bucket to managed_auth_distinct_user_count, which carries the measurement, attribution, and null rules. Users whose requests used no stored credential count in neither bucket.
3607
3608 - `managed_auth_distinct_user_count: optional number or null`
3609
3610 Number of distinct users whose use of this connector on the requested day ran on Enterprise Managed Auth (an organization-managed credential provisioned through the organization's identity provider), read from the token record each request used. Null, never 0, when managed-auth reporting is not enabled for the organization, the value cannot be attributed to the row, no credentialed requests and no managed-token mint events (a managed credential being provisioned for a user's use of the connector) were observed that day, or the day predates 2026-07-01, the first day the backing data exists (forward-only data, no backfill). When credentialed requests or mint events were observed and attributed, both managed-auth fields populate, reporting 0 for a bucket with no users; the two counts are independent, not a partition — a user whose requests that day used both kinds of credential counts in both. Mint events carry user but not surface attribution, so they count as observed auth activity on user_id and rbac_group_id cuts — attributed to the user the credential was provisioned for — but never on a cut that references product (group or filter). Date-range rollup mode (starting_date/ending_date) computes both fields exactly over the window — distinct users with at least one qualifying day — when the whole window starts on or after 2026-07-01, with the null-versus-0 and mint-event rules applying with the window in place of the day; a range starting earlier reports every managed-auth field as null, never a partial-window value.
3611
3612 - `product: optional string or null`
3613
3614 Product that produced this row's activity: one of chat, claude_code, cowork, or office_agent (the canonical Cost & Usage product naming; an office_agent row's per-surface breakdown is in its office_metrics). On /plugins only cowork and claude_code occur (the only surfaces with plugin attribution); /artifacts and /apps/chat/projects do not support the product dimension (a product `group_by[]` or `filter[]` there is rejected). Present only when the request grouped by product.
3615
3616 - `rbac_group_id: optional string or null`
3617
3618 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
3619
3620 - `rbac_group_name: optional string or null`
3621
3622 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
3623
3624 - `read_call_count: optional number or null`
3625
3626 Number of connector tool calls on the requested day whose trusted read-only annotation marked them read-only. Call count, not distinct users. Every call recorded on a classified surface lands in exactly one of read_call_count, write_call_count, or unclassified_call_count, so the three sum to the day's classified calls. Classification is forward-only per surface: claude.ai from 2026-06-01, Claude Code from 2026-05-30, Claude in Office from 2026-05-29, Cowork from 2026-06-02 (Cowork clients predating annotation forwarding land in unclassified_call_count). Null, never 0, when the value cannot be stated: the read/write split is not enabled for this organization, or the day predates 2026-05-29. For a date-range total, sum the per-day values, but treat a window that extends before 2026-05-29 as null rather than summing only its covered days — date-range rollup mode (starting_date/ending_date) applies both rules server-side.
3627
3628 - `unclassified_call_count: optional number or null`
3629
3630 Number of connector tool calls on the requested day with no trusted read-only annotation — the annotation is optional in the MCP spec and is discarded when connector access controls are active, so unclassified calls are common. This field shows how much of the day's classified activity the read/write split actually covers. Call count, not distinct users. One of the three call-classification buckets; see read_call_count for the per-surface data-start dates, null conditions, and date-range guidance.
3631
3632 - `user_id: optional string or null`
3633
3634 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
3635
3636 - `write_call_count: optional number or null`
3637
3638 Number of connector tool calls on the requested day whose trusted read-only annotation marked them not read-only. Call count, not distinct users. One of the three call-classification buckets; see read_call_count for the per-surface data-start dates, null conditions, and date-range guidance.
3639
3640 - `next_page: string or null`
3641
3642 Opaque cursor for the next page, or null if no more results
3643
3644# Chat Projects
3645
3646## Get Chat Project Usage
3647
3648**get** `/v1/organizations/analytics/apps/chat/projects`
2749## Analytics › Chat Projects
2750
2751### Get Chat Project Usage
2752
2753**GET** `/v1/organizations/analytics/apps/chat/projects`
36492754
36502755Get per-project activity for a given day, with cursor-based pagination.
36512756
from line 2760
36552760supported dimensions. Available to organizations on a Claude Enterprise
36562761plan. Requires an API key with the `read:analytics` scope.
36572762
3658### Query Parameters
2763#### Query parameters
36592764
36602765- `date: optional string`
36612766
36622767 UTC date in YYYY-MM-DD format. The day to get project activity for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
36632768
2769 format: date
2770
36642771- `ending_date: optional string`
36652772
36662773 UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days after starting_date.
36672774
2775 format: date
2776
36682777- `filter: optional array of string`
36692778
36702779 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: project_id, rbac_group_id, user_id. Value forms: project_id takes a tagged project id (claude_proj_...); rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
36712780
2781 maxItems: 100
2782
36722783- `group_by: optional array of "rbac_group_id" or "user_id"`
36732784
36742785 Dimensions to break results out by (e.g. group_by[]=user_id). Supported on this endpoint: rbac_group_id, user_id. Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses via next_page; an unsupported dimension returns 400. rbac_group_id attributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
36752786
2787 maxItems: 100
2788
36762789 - `"rbac_group_id"`
36772790
36782791 - `"user_id"`
from line 2794
36812794
36822795 Number of results per page (1-1000, default 100).
36832796
2797 minimum: 1, maximum: 1000
2798
36842799- `order: optional "asc" or "desc"`
36852800
36862801 Sort direction: 'asc' or 'desc'. Defaults to 'asc' for the endpoint's sort column and to 'desc' when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.
from line 2816
37012816
37022817 UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either date or starting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
37032818
3704### Returns
3705
3706- `ChatProjectUsage object { data, next_page }`
2819 format: date
2820
2821#### Returns
2822
2823- `ChatProjectUsage object`
37072824
37082825 Response for GET /v1/organizations/analytics/apps/chat/projects.
37092826
3710 - `data: array of object { distinct_user_count, message_count, project_id, 8 more }`
2827 - `data: array of object`
37112828
37122829 - `distinct_user_count: number`
37132830
from line 2862
37452862
37462863 Object type. Always `user`.
37472864
3748 - `"user"`
2865 default: user
37492866
37502867 - `distinct_conversation_count: optional number or null`
37512868
from line 2888
37712888
37722889 Opaque cursor for the next page, or null if no more results
37732890
3774### Example
3775
3776```http
2891#### Example
2892
2893```bash
37772894curl https://api.anthropic.com/v1/organizations/analytics/apps/chat/projects \
37782895 -H 'anthropic-version: 2023-06-01' \
37792896 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
37802897```
37812898
3782#### Response
2899##### Response (200)
37832900
37842901```json
37852902{
from line 2923
38062923}
38072924```
38082925
3809## Domain Types
3810
3811### Chat Project Usage
3812
3813- `ChatProjectUsage object { data, next_page }`
3814
3815 Response for GET /v1/organizations/analytics/apps/chat/projects.
3816
3817 - `data: array of object { distinct_user_count, message_count, project_id, 8 more }`
3818
3819 - `distinct_user_count: number`
3820
3821 Number of distinct users who used the project on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
3822
3823 - `message_count: number`
3824
3825 Number of messages sent in the project on the requested day
3826
3827 - `project_id: string`
3828
3829 Tagged project identifier (e.g. claude_proj_...)
3830
3831 - `project_name: string`
3832
3833 Name of the project
3834
3835 - `created_at: optional string or null`
3836
3837 Project creation timestamp, RFC 3339. Null if the project was deleted before attribution was recorded.
3838
3839 - `created_by: optional AnalyticsUser or null`
3840
3841 User identifier.
3842
3843 - `id: string`
3844
3845 Tagged user identifier (e.g. `user_...`)
3846
3847 - `email_address: string`
3848
3849 Email address of the user
3850
3851 - `type: optional "user"`
3852
3853 Object type. Always `user`.
3854
3855 - `"user"`
3856
3857 - `distinct_conversation_count: optional number or null`
3858
3859 Number of distinct conversations in the project. Null on aggregated rows where a distinct count cannot be computed.
3860
3861 - `product: optional string or null`
3862
3863 Product that produced this row's activity: one of chat, claude_code, cowork, or office_agent (the canonical Cost & Usage product naming; an office_agent row's per-surface breakdown is in its office_metrics). On /plugins only cowork and claude_code occur (the only surfaces with plugin attribution); /artifacts and /apps/chat/projects do not support the product dimension (a product `group_by[]` or `filter[]` there is rejected). Present only when the request grouped by product.
3864
3865 - `rbac_group_id: optional string or null`
3866
3867 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
3868
3869 - `rbac_group_name: optional string or null`
3870
3871 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
3872
3873 - `user_id: optional string or null`
3874
3875 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
3876
3877 - `next_page: string or null`
3878
3879 Opaque cursor for the next page, or null if no more results
3880
3881# Plugins
3882
3883## Get Plugin Usage
3884
3885**get** `/v1/organizations/analytics/plugins`
2926## Analytics › Plugins
2927
2928### Get Plugin Usage
2929
2930**GET** `/v1/organizations/analytics/plugins`
38862931
38872932Get per-plugin install + invocation usage for a given day, with pagination.
38882933
from line 2943
38982943`read:analytics` scope. `starting_date` / `ending_date` select
38992944range-rollup mode like /skills.
39002945
3901### Query Parameters
2946#### Query parameters
39022947
39032948- `date: optional string`
39042949
39052950 UTC date in YYYY-MM-DD format. The day to get plugin usage for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
39062951
2952 format: date
2953
39072954- `ending_date: optional string`
39082955
39092956 UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days after starting_date.
39102957
2958 format: date
2959
39112960- `filter: optional array of string`
39122961
39132962 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: plugin_name, product, rbac_group_id, user_id. Value forms: plugin_name matches case-insensitively; product is claude_code or cowork (the only surfaces with plugin attribution); rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
39142963
2964 maxItems: 100
2965
39152966- `group_by: optional array of "product" or "rbac_group_id" or "user_id"`
39162967
39172968 Dimensions to break results out by (e.g. group_by[]=user_id). Supported on this endpoint: product, rbac_group_id, user_id. On this endpoint product takes the values claude_code or cowork only (the surfaces with plugin attribution). Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses via next_page; an unsupported dimension returns 400. rbac_group_id attributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
39182969
2970 maxItems: 100
2971
39192972 - `"product"`
39202973
39212974 - `"rbac_group_id"`
from line 2979
39262979
39272980 Number of results per page (1-1000, default 100).
39282981
2982 minimum: 1, maximum: 1000
2983
39292984- `order: optional "asc" or "desc"`
39302985
39312986 Sort direction: 'asc' or 'desc'. Defaults to 'asc' for the endpoint's sort column and to 'desc' when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.
from line 3001
39463001
39473002 UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either date or starting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
39483003
3949### Returns
3950
3951- `PluginUsage object { data, next_page }`
3004 format: date
3005
3006#### Returns
3007
3008- `PluginUsage object`
39523009
39533010 Response for GET /v1/organizations/analytics/plugins.
39543011
3955 - `data: array of object { claude_code_metrics, cowork_metrics, distinct_user_count, 8 more }`
3956
3957 - `claude_code_metrics: object { distinct_session_plugin_used_count }`
3012 - `data: array of object`
3013
3014 - `claude_code_metrics: object`
39583015
39593016 Claude Code activity metrics for a single plugin on a given day.
39603017
from line 3019
39623019
39633020 Number of distinct Claude Code sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.
39643021
3965 - `cowork_metrics: object { distinct_session_plugin_used_count }`
3022 - `cowork_metrics: object`
39663023
39673024 Cowork activity metrics for a single plugin on a given day.
39683025
from line 3067
40103067
40113068 Opaque cursor for the next page, or null if no more results
40123069
4013### Example
4014
4015```http
3070#### Example
3071
3072```bash
40163073curl https://api.anthropic.com/v1/organizations/analytics/plugins \
40173074 -H 'anthropic-version: 2023-06-01' \
40183075 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
40193076```
40203077
4021#### Response
3078##### Response (200)
40223079
40233080```json
40243081{
from line 3102
40453102}
40463103```
40473104
4048## Domain Types
4049
4050### Plugin Usage
4051
4052- `PluginUsage object { data, next_page }`
4053
4054 Response for GET /v1/organizations/analytics/plugins.
4055
4056 - `data: array of object { claude_code_metrics, cowork_metrics, distinct_user_count, 8 more }`
4057
4058 - `claude_code_metrics: object { distinct_session_plugin_used_count }`
4059
4060 Claude Code activity metrics for a single plugin on a given day.
4061
4062 - `distinct_session_plugin_used_count: number or null`
4063
4064 Number of distinct Claude Code sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.
4065
4066 - `cowork_metrics: object { distinct_session_plugin_used_count }`
4067
4068 Cowork activity metrics for a single plugin on a given day.
4069
4070 - `distinct_session_plugin_used_count: number or null`
4071
4072 Number of distinct Cowork sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.
4073
4074 - `distinct_user_count: number`
4075
4076 Number of distinct users with recorded install or invocation activity for the plugin on the requested day (install-only users count), or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
4077
4078 - `install_count: number or null`
4079
4080 Number of distinct users who installed the plugin on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
4081
4082 - `invocation_count: number`
4083
4084 Number of plugin invocations on the requested day
4085
4086 - `plugin_name: string`
4087
4088 Name of the plugin
4089
4090 - `plugin_id: optional string or null`
4091
4092 Stable plugin identifier when available (e.g. serena@claude-plugins-official). Null for third-party Claude Code plugins (redacted at the source) and Cowork slash commands that carry only a hashed id.
4093
4094 - `product: optional string or null`
4095
4096 Product that produced this row's activity: one of chat, claude_code, cowork, or office_agent (the canonical Cost & Usage product naming; an office_agent row's per-surface breakdown is in its office_metrics). On /plugins only cowork and claude_code occur (the only surfaces with plugin attribution); /artifacts and /apps/chat/projects do not support the product dimension (a product `group_by[]` or `filter[]` there is rejected). Present only when the request grouped by product.
4097
4098 - `rbac_group_id: optional string or null`
4099
4100 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
4101
4102 - `rbac_group_name: optional string or null`
4103
4104 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
4105
4106 - `user_id: optional string or null`
4107
4108 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
4109
4110 - `next_page: string or null`
4111
4112 Opaque cursor for the next page, or null if no more results
4113
4114# Artifacts
4115
4116## Get Artifact Activity
4117
4118**get** `/v1/organizations/analytics/artifacts`
3105## Analytics › Artifacts
3106
3107### Get Artifact Activity
3108
3109**GET** `/v1/organizations/analytics/artifacts`
41193110
41203111Get artifact-creation activity for a given day, broken out by MIME type.
41213112
from line 3115
41243115can be broken out per member or per RBAC group via group_by[], and scoped
41253116via filter[]. Requires an API key with the `read:analytics` scope.
41263117
4127### Query Parameters
3118#### Query parameters
41283119
41293120- `date: string`
41303121
41313122 UTC date in YYYY-MM-DD format. The day to get artifact activity for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
41323123
3124 format: date
3125
41333126- `filter: optional array of string`
41343127
41353128 Filters as 'dimension:value', e.g. filter[]=rbac_group_id:<id>. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: artifact_type, is_shared, rbac_group_id, user_id. Value forms: artifact_type is a canonical artifact MIME type (e.g. text/markdown) or 'other'; is_shared is 'true' or 'false'; rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.
41363129
3130 maxItems: 100
3131
41373132- `group_by: optional array of "rbac_group_id" or "user_id"`
41383133
41393134 Dimensions to break results out by: user_id and/or rbac_group_id. The ungrouped artifact-type cube is finite and returned in full; grouped queries multiply the cube and paginate via next_page. rbac_group_id attributes a user to every group they held at any point during the requested UTC day, so grouped rows are not an exclusive partition. At most 100 entries.
41403135
3136 maxItems: 100
3137
41413138 - `"rbac_group_id"`
41423139
41433140 - `"user_id"`
from line 3143
41463143
41473144 Maximum rows to return (1-1000, default 100). The ungrouped artifact-type cube is finite and returned in full; limit is the page size only when group_by[] multiplies the cube.
41483145
3146 minimum: 1, maximum: 1000
3147
41493148- `page: optional string`
41503149
41513150 Opaque cursor from a previous response's next_page field. Only valid with group_by[] — the ungrouped cube is never paginated.
41523151
4153### Returns
4154
4155- `ArtifactUsage object { data, next_page }`
3152#### Returns
3153
3154- `ArtifactUsage object`
41563155
41573156 Response for GET /v1/organizations/analytics/artifacts.
41583157
from line 3160
41613160 `rbac_group_id`) multiply the cube and paginate like the other analytics
41623161 list endpoints.
41633162
4164 - `data: array of object { artifact_type, artifacts_created_count, distinct_user_count, 6 more }`
3163 - `data: array of object`
41653164
41663165 - `artifact_type: string`
41673166
from line 3202
42033202
42043203 Cursor for the next page of a grouped query; always null for the ungrouped artifact-type cube, which is returned in full.
42053204
4206### Example
4207
4208```http
3205#### Example
3206
3207```bash
42093208curl https://api.anthropic.com/v1/organizations/analytics/artifacts \
42103209 -H 'anthropic-version: 2023-06-01' \
42113210 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
42123211```
42133212
4214#### Response
3213##### Response (200)
42153214
42163215```json
42173216{
from line 3230
42313230 "next_page": "next_page"
42323231}
42333232```
4234
4235## Domain Types
4236
4237### Artifact Usage
4238
4239- `ArtifactUsage object { data, next_page }`
4240
4241 Response for GET /v1/organizations/analytics/artifacts.
4242
4243 `next_page` is null on ungrouped queries — the artifact-type cube is
4244 finite and returned in full. Grouped queries (`group_by[]` on `user_id` /
4245 `rbac_group_id`) multiply the cube and paginate like the other analytics
4246 list endpoints.
4247
4248 - `data: array of object { artifact_type, artifacts_created_count, distinct_user_count, 6 more }`
4249
4250 - `artifact_type: string`
4251
4252 Canonical artifact MIME type (e.g. text/markdown, application/vnd.ant.react, image/svg+xml), or 'other'.
4253
4254 - `artifacts_created_count: number`
4255
4256 Number of artifacts created in this bucket on the requested day
4257
4258 - `distinct_user_count: number`
4259
4260 Number of distinct users who created artifacts in this bucket on the requested day
4261
4262 - `is_shared: boolean`
4263
4264 Whether the artifacts in this bucket have ever been shared.
4265
4266 - `published_artifacts_created_count: number`
4267
4268 Number of those artifacts that have been published
4269
4270 - `product: optional string or null`
4271
4272 Product that produced this row's activity: one of chat, claude_code, cowork, or office_agent (the canonical Cost & Usage product naming; an office_agent row's per-surface breakdown is in its office_metrics). On /plugins only cowork and claude_code occur (the only surfaces with plugin attribution); /artifacts and /apps/chat/projects do not support the product dimension (a product `group_by[]` or `filter[]` there is rejected). Present only when the request grouped by product.
4273
4274 - `rbac_group_id: optional string or null`
4275
4276 Tagged RBAC group identifier (`rbac_group_...`), matching the spend-limits API spelling. Present only when the request grouped by `rbac_group_id`.
4277
4278 - `rbac_group_name: optional string or null`
4279
4280 Resolved RBAC group display name, alongside `rbac_group_id` when name resolution is available. Null if the group has been deleted or its name could not be resolved; `rbac_group_id` remains the stable key.
4281
4282 - `user_id: optional string or null`
4283
4284 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
4285
4286 - `next_page: optional string or null`
4287
4288 Cursor for the next page of a grouped query; always null for the ungrouped artifact-type cube, which is returned in full.
42893233