title: Analytics url: https://platform.claude.com/docs/en/api/beta/organization/analytics
Analytics
Get Activity Summaries
GET /v1/organizations/analytics/summaries
Get organization-wide activity summaries for a date range.
Returns one entry per day from starting_date (inclusive) to ending_date
(exclusive). Data is typically available with a 1-day lag and may be
revised by a few percent over the following days: when ending_date is
omitted it defaults to the most recent available day + 1, so the last
entry covers the most recent available day. The series can be scoped to
an RBAC group via filter[]=rbac_group_id:{id}. Available to
organizations on a Claude Enterprise plan. Requires an API key with the
read:analytics scope.
Query parameters
-
starting_date: stringUTC 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.
format: date
-
ending_date: optional stringUTC 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.
format: date
-
filter: optional array of stringFilters as
dimension:value. Onlyrbac_group_idis 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_idaccepts 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.maxItems: 100
Returns
-
BetaActivitySummary objectResponse for GET /v1/organizations/analytics/summaries.
-
summaries: array of object-
assigned_seat_count: number or nullNumber of seats currently assigned to members. Null when the response is scoped to an RBAC group — seat assignment is org-wide and has no per-group analogue.
-
cowork_daily_active_user_count: numberNumber of users with Cowork activity on the requested day
-
cowork_monthly_active_user_count: numberNumber of users with Cowork activity in the 30-day rolling window
-
cowork_weekly_active_user_count: numberNumber of users with Cowork activity in the 7-day rolling window
-
daily_active_user_count: numberNumber of users with token consumption on the requested day
-
daily_adoption_rate: number or nullPercentage of assigned seats with activity on the requested day (
DAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
ending_at: stringEnd of the aggregation period (exclusive), UTC midnight in RFC 3339 format (e.g.
2026-01-16T00:00:00Z).format: date-time
-
monthly_active_user_count: numberNumber of users with token consumption in the 30-day rolling window
-
monthly_adoption_rate: number or nullPercentage of assigned seats with activity in the 30-day rolling window (
MAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
pending_invite_count: number or nullNumber of pending invitations to join the organization. Null when the response is scoped to an RBAC group.
-
starting_at: stringStart of the aggregation period (inclusive), UTC midnight in RFC 3339 format (e.g.
2026-01-15T00:00:00Z).format: date-time
-
weekly_active_user_count: numberNumber of users with token consumption in the 7-day rolling window
-
weekly_adoption_rate: number or nullPercentage of assigned seats with activity in the 7-day rolling window (
WAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
chat_daily_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
chat_monthly_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
chat_weekly_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_daily_active_user_count: optional number or nullNumber of users with Claude Code activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_monthly_active_user_count: optional number or nullNumber of users with Claude Code activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_weekly_active_user_count: optional number or nullNumber of users with Claude Code activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_daily_active_user_count: optional number or nullNumber of users with Claude Design activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_monthly_active_user_count: optional number or nullNumber of users with Claude Design activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_weekly_active_user_count: optional number or nullNumber of users with Claude Design activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_daily_active_user_count: optional number or nullNumber of users with Claude in Office activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_monthly_active_user_count: optional number or nullNumber of users with Claude in Office activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_weekly_active_user_count: optional number or nullNumber of users with Claude in Office activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_daily_active_user_count: optional number or nullNumber of users with Claude Science activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_entitled_user_count: optional number or nullNumber of users with a Claude Science seat entitlement (per-seat RBAC) at the time of the daily snapshot. The funnel top; independent of the org-level Claude Science toggle. Null when the response is scoped to an RBAC group — entitlement is org-wide and has no per-group analogue. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_monthly_active_user_count: optional number or nullNumber of users with Claude Science activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_weekly_active_user_count: optional number or nullNumber of users with Claude Science activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/summaries \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"summaries": [
{
"assigned_seat_count": 0,
"cowork_daily_active_user_count": 0,
"cowork_monthly_active_user_count": 0,
"cowork_weekly_active_user_count": 0,
"daily_active_user_count": 0,
"daily_adoption_rate": 0,
"ending_at": "2019-12-27T18:11:19.117Z",
"monthly_active_user_count": 0,
"monthly_adoption_rate": 0,
"pending_invite_count": 0,
"starting_at": "2019-12-27T18:11:19.117Z",
"weekly_active_user_count": 0,
"weekly_adoption_rate": 0,
"chat_daily_active_user_count": 0,
"chat_monthly_active_user_count": 0,
"chat_weekly_active_user_count": 0,
"claude_code_daily_active_user_count": 0,
"claude_code_monthly_active_user_count": 0,
"claude_code_weekly_active_user_count": 0,
"claude_design_daily_active_user_count": 0,
"claude_design_monthly_active_user_count": 0,
"claude_design_weekly_active_user_count": 0,
"office_agent_daily_active_user_count": 0,
"office_agent_monthly_active_user_count": 0,
"office_agent_weekly_active_user_count": 0,
"science_daily_active_user_count": 0,
"science_entitled_user_count": 0,
"science_monthly_active_user_count": 0,
"science_weekly_active_user_count": 0
}
]
}Domain types
Beta Activity Summary
-
BetaActivitySummary objectResponse for GET /v1/organizations/analytics/summaries.
-
summaries: array of object-
assigned_seat_count: number or nullNumber of seats currently assigned to members. Null when the response is scoped to an RBAC group — seat assignment is org-wide and has no per-group analogue.
-
cowork_daily_active_user_count: numberNumber of users with Cowork activity on the requested day
-
cowork_monthly_active_user_count: numberNumber of users with Cowork activity in the 30-day rolling window
-
cowork_weekly_active_user_count: numberNumber of users with Cowork activity in the 7-day rolling window
-
daily_active_user_count: numberNumber of users with token consumption on the requested day
-
daily_adoption_rate: number or nullPercentage of assigned seats with activity on the requested day (
DAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
ending_at: stringEnd of the aggregation period (exclusive), UTC midnight in RFC 3339 format (e.g.
2026-01-16T00:00:00Z).format: date-time
-
monthly_active_user_count: numberNumber of users with token consumption in the 30-day rolling window
-
monthly_adoption_rate: number or nullPercentage of assigned seats with activity in the 30-day rolling window (
MAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
pending_invite_count: number or nullNumber of pending invitations to join the organization. Null when the response is scoped to an RBAC group.
-
starting_at: stringStart of the aggregation period (inclusive), UTC midnight in RFC 3339 format (e.g.
2026-01-15T00:00:00Z).format: date-time
-
weekly_active_user_count: numberNumber of users with token consumption in the 7-day rolling window
-
weekly_adoption_rate: number or nullPercentage of assigned seats with activity in the 7-day rolling window (
WAU / assigned_seat_count * 100). Null when the response is scoped to an RBAC group. -
chat_daily_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
chat_monthly_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
chat_weekly_active_user_count: optional number or nullNumber of users with claude.ai (chat) activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_daily_active_user_count: optional number or nullNumber of users with Claude Code activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_monthly_active_user_count: optional number or nullNumber of users with Claude Code activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_code_weekly_active_user_count: optional number or nullNumber of users with Claude Code activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_daily_active_user_count: optional number or nullNumber of users with Claude Design activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_monthly_active_user_count: optional number or nullNumber of users with Claude Design activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
claude_design_weekly_active_user_count: optional number or nullNumber of users with Claude Design activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_daily_active_user_count: optional number or nullNumber of users with Claude in Office activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_monthly_active_user_count: optional number or nullNumber of users with Claude in Office activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
office_agent_weekly_active_user_count: optional number or nullNumber of users with Claude in Office activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_daily_active_user_count: optional number or nullNumber of users with Claude Science activity on the requested day. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_entitled_user_count: optional number or nullNumber of users with a Claude Science seat entitlement (per-seat RBAC) at the time of the daily snapshot. The funnel top; independent of the org-level Claude Science toggle. Null when the response is scoped to an RBAC group — entitlement is org-wide and has no per-group analogue. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_monthly_active_user_count: optional number or nullNumber of users with Claude Science activity in the 30-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
science_weekly_active_user_count: optional number or nullNumber of users with Claude Science activity in the 7-day rolling window. Omitted from the response while the per-product breakdown is not enabled for this organization.
-
-
Beta Analytics User
-
BetaAnalyticsUser objectA user in the organization, identified by tagged id and email address.
-
type: "user"Object type. Always
user.default: user
-
id: stringTagged user identifier (e.g.
user_...) -
email_address: stringEmail address of the user
-
Beta Analytics User Actor
-
BetaAnalyticsUserActor object-
type: "user_actor"Actor type. Always
"user_actor". -
deleted: booleanTrue when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider).
emailstays populated for removed users and is null when the account has been deleted.namefollows the rules described on that field. Theuser_idis still populated for reconciliation. -
email: string or nullThe 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 (checkname). -
name: string or nullThe user's full name. Null when the user has not set a name. Returns
"Deleted User"when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example,"Claude Security"for usage by Anthropic's security-patching service) or null. -
user_id: stringTagged user ID.
-
Beta Connector Office Product Metrics
-
BetaConnectorOfficeProductMetrics objectOffice Agent activity metrics for a single connector on a given day within one Office product.
-
distinct_session_connector_used_count: number or nullNumber 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.
-
Beta Office Product Metrics
-
BetaOfficeProductMetrics objectOffice Agent activity metrics for a single user on a given day within one Office product.
-
connectors_used_count: numberNumber of MCP connector invocations
-
distinct_connectors_used_count: number or nullNumber 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.
-
distinct_session_count: number or nullNumber 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.
-
distinct_skills_used_count: number or nullNumber of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
message_count: numberNumber of messages sent
-
skills_used_count: numberNumber of skill invocations
-
Beta Skill Office Product Metrics
-
BetaSkillOfficeProductMetrics objectOffice Agent activity metrics for a single skill on a given day within one Office product.
-
distinct_session_skill_used_count: number or nullNumber 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.
-
Beta Tool Action Counts
-
BetaToolActionCounts objectAccepted/rejected counts for a single Claude Code tool type.
-
accepted_count: numberNumber of tool proposals accepted
-
rejected_count: numberNumber of tool proposals rejected
-
Analytics › Usage
Get Token Usage Over Time
GET /v1/organizations/analytics/usage_report
Get token usage over time across a date range.
Returns token usage bucketed by minute, hour, or day, optionally broken
down by product, model, context window, inference region, or speed.
Available to organizations on a Claude Enterprise plan. Requires an API
key with the read:analytics scope.
Query parameters
-
starting_at: stringStart of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
format: date-time
-
bucket_width: optional "1d" or "1h" or "1m"Time bucket granularity.
default: 1d
-
"1d" -
"1h" -
"1m"
-
-
claude_tag_categories: optional array of "dm" or "engaged" or "monitoring" or 2 moreFilter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches.
dmusage is reported under the user's product rather thanclaude-tag, so combining this filter withproducts[]=claude-tagexcludes it. Usegroup_by[]=claude_tag_categoryto break out per-category values.maxItems: 100
-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_ids: optional array of stringFilter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Usegroup_by[]=claude_tag_user_idto break out per-user values.maxItems: 100
-
context_windows: optional array of "0-200k" or "200k-1M"Filter to specific context-window pricing tiers. Use
group_by[]=context_windowto break out per-tier values.maxItems: 100
-
"0-200k" -
"200k-1M"
-
-
ending_at: optional stringEnd of range, exclusive. When omitted, defaults to the earlier of now and
starting_at+ 31 days. The range may span at most 31 days.format: date-time
-
group_by: optional array of "claude_tag_category" or "claude_tag_user_id" or "context_window" or 6 moreDimensions 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.
maxItems: 100
-
"claude_tag_category" -
"claude_tag_user_id" -
"context_window" -
"inference_geo" -
"model" -
"product" -
"rbac_group_id" -
"slack_channel_id" -
"speed"
-
-
inference_geos: optional array of "global" or "not_available" or "us"Filter to specific inference regions.
not_availablematches rows where the region is unset. Usegroup_by[]=inference_geoto break out per-region values.maxItems: 100
-
"global" -
"not_available" -
"us"
-
-
limit: optional numberMaximum 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).minimum: 1
-
models: optional array of stringModels to include. Defaults to all models. Use
group_by[]=modelto break out per-model values.maxItems: 100
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
products: optional array of "chat" or "claude-tag" or "claude_code" or 4 moreProduct surfaces to include. Defaults to all products. Use
group_by[]=productto break out per-product values.maxItems: 100
-
"chat" -
"claude-tag" -
"claude_code" -
"claude_design" -
"claude_in_chrome" -
"cowork" -
"office_agent"
-
-
rbac_group_ids: optional array of stringFilter 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.maxItems: 100
-
slack_channel_ids: optional array of stringFilter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_idto break out per-channel values.maxItems: 100
-
speeds: optional array of "fast" or "standard"Filter to fast or standard inference mode. Use
group_by[]=speedto break out per-mode values.maxItems: 100
-
"fast" -
"standard"
-
-
user_ids: optional array of stringFilter to specific users by tagged user ID.
maxItems: 100
Returns
-
BetaUsageBucket object-
data: array of objectTime buckets for this page, oldest first: one per
bucket_widthinterval, including intervals with no data (theirresultslist is empty). A page holds at mostlimitbuckets.-
ending_at: stringEnd of the time bucket (exclusive) in RFC 3339 format.
format: date-time
-
results: array of objectRows 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 thegroup_by[]parameter).-
cache_creation: BetaCacheCreationThe number of input tokens for cache creation.
-
ephemeral_1h_input_tokens: numberThe number of input tokens used to create the 1 hour cache entry.
default: 0, minimum: 0
-
ephemeral_5m_input_tokens: numberThe number of input tokens used to create the 5 minute cache entry.
default: 0, minimum: 0
-
-
cache_read_input_tokens: numberThe number of input tokens read from the cache.
-
claude_tag_category: "dm" or "engaged" or "monitoring" or 2 more or nullClaude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). Populated only whenclaude_tag_categoryis ingroup_by[]; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not underclaude-tag. New categories may be added over time.-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_id: string or nullSlack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only whenclaude_tag_user_idis ingroup_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for examplemonitoring, andproactiveusage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined withgroup_by[]=rbac_group_idor therbac_group_ids[]filter. -
context_window: "0-200k" or "200k-1M" or nullContext-window pricing tier of the usage or cost. Null unless
context_windowis ingroup_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.-
"0-200k" -
"200k-1M"
-
-
inference_geo: "global" or "us" or nullInference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).-
"global" -
"us"
-
-
model: string or nullModel that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5). Null unlessmodelis ingroup_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution. -
output_tokens: numberThe number of output tokens generated.
-
product: string or nullProduct 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 includechat,claude_code,cowork,office_agent,claude_in_chrome,claude_design, andclaude-tag.claude-tagis Claude Tag, the Claude product in Slack. Some unattributed usage is reported as "other". -
rbac_group_id: string or nullRBAC 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 anrbac_group_ids[]filter value. Populated only whenrbac_group_idis ingroup_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 withoutgroup_by[]. -
requests: number or nullNumber 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). -
server_tool_use: objectServer-side tool usage metrics.
-
web_search_requests: numberThe number of web search requests made.
-
-
slack_channel_id: string or nullSlack channel the usage originated from. Populated only when
slack_channel_idis ingroup_by[]; null for usage outside Slack (and for rows recorded before channel attribution was enabled). -
speed: "fast" or "standard" or nullInference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].-
"fast" -
"standard"
-
-
uncached_input_tokens: numberThe number of uncached input tokens processed.
-
-
starting_at: stringStart of the time bucket (inclusive) in RFC 3339 format.
format: date-time
-
-
data_refreshed_at: string or nullRFC 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
resultslist is empty. Buckets beyond this watermark are incomplete; for stable results, setending_atto 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).format: date-time
-
has_more: booleanWhether another page is available. When true, pass
next_pageas thepageparameter to fetch it. -
next_page: string or nullOpaque cursor for the next page, or null when
has_moreis false. Pass it as thepageparameter, 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. -
organization_id: stringID of the Organization.
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/usage_report \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"ending_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 0
},
"cache_read_input_tokens": 0,
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"inference_geo": "global",
"model": "claude-opus-5",
"output_tokens": 0,
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 0,
"server_tool_use": {
"web_search_requests": 10
},
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"uncached_input_tokens": 0
}
],
"starting_at": "2019-12-27T18:11:19.117Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Get Per-User Token Usage
GET /v1/organizations/analytics/user_usage_report
Get per-user token usage across a date range.
Returns one row per user, ranked by the chosen token metric. Use this to
see which users consume the most tokens. Only usage attributable to a
seat user is included; for organization-wide totals including direct
API-key and automation traffic, use the bucketed
/v1/organizations/analytics/usage_report endpoint. Available to
organizations on a Claude Enterprise plan. Requires an API key with the
read:analytics scope.
Query parameters
-
starting_at: stringStart of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
format: date-time
-
bucket_width: optional "1d" or "1h" or "1m"Time-bucket granularity. When set, each row's
starting_atandending_atare populated and one actor may span several rows (one per time bucket with usage). The time bucket counts towardlimit, so one page can return multiple rows for the same actor.ending_atis required whenbucket_widthis set, and withbucket_width="1m"the range may span at most 24 hours. When omitted, each row aggregates the full[starting_at, ending_at)range.-
"1d" -
"1h" -
"1m"
-
-
claude_tag_categories: optional array of "dm" or "engaged" or "monitoring" or 2 moreFilter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches.
dmusage is reported under the user's product rather thanclaude-tag, so combining this filter withproducts[]=claude-tagexcludes it. Usegroup_by[]=claude_tag_categoryto break out per-category values.maxItems: 100
-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_ids: optional array of stringFilter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Usegroup_by[]=claude_tag_user_idto break out per-user values.maxItems: 100
-
context_windows: optional array of "0-200k" or "200k-1M"Filter to specific context-window pricing tiers. Use
group_by[]=context_windowto break out per-tier values.maxItems: 100
-
"0-200k" -
"200k-1M"
-
-
ending_at: optional stringEnd of range, exclusive. When omitted, defaults to the earlier of now and
starting_at+ 31 days. The range may span at most 31 days.format: date-time
-
exclude_deleted_users: optional booleanIf true, omit rows for users who are deleted (
deleted: true). A page may contain fewer thanlimitrows; usehas_moreandnext_pageto paginate as usual.default: false
-
group_by: optional array of "claude_tag_category" or "claude_tag_user_id" or "context_window" or 6 moreBreak each actor's row out by the given dimensions. Accepts the same values as the bucketed
/usage_reportendpoint.limitbounds (actor × time bucket × dimension) rows — with dimensions orbucket_widthpresent, one actor may span several rows.maxItems: 100
-
"claude_tag_category" -
"claude_tag_user_id" -
"context_window" -
"inference_geo" -
"model" -
"product" -
"rbac_group_id" -
"slack_channel_id" -
"speed"
-
-
inference_geos: optional array of "global" or "not_available" or "us"Filter to specific inference regions.
not_availablematches rows where the region is unset. Usegroup_by[]=inference_geoto break out per-region values.maxItems: 100
-
"global" -
"not_available" -
"us"
-
-
limit: optional numberNumber of rows per page (1-1000, default 20). One row per actor unless
group_by[]orbucket_widthsplits an actor across rows;cost_type/token_typefan-out rows (cost endpoint only) are the exception — they do not count toward this limit, sodatacan exceed it.default: 20, maximum: 1000, minimum: 1
-
models: optional array of stringModels to include. Defaults to all models. Use
group_by[]=modelto break out per-model values.maxItems: 100
-
order: optional "asc" or "desc"Sort direction. Defaults to
desc.default: desc
-
"asc" -
"desc"
-
-
order_by: optional "output_tokens" or "requests" or "total_tokens" or "uncached_input_tokens"Metric to rank actors by. Defaults to
total_tokens.default: total_tokens
-
"output_tokens" -
"requests" -
"total_tokens" -
"uncached_input_tokens"
-
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
products: optional array of "chat" or "claude-tag" or "claude_code" or 4 moreProduct surfaces to include. Defaults to all products.
maxItems: 100
-
"chat" -
"claude-tag" -
"claude_code" -
"claude_design" -
"claude_in_chrome" -
"cowork" -
"office_agent"
-
-
rbac_group_ids: optional array of stringFilter 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.maxItems: 100
-
slack_channel_ids: optional array of stringFilter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_idto break out per-channel values.maxItems: 100
-
speeds: optional array of "fast" or "standard"Filter to fast or standard inference mode. Use
group_by[]=speedto break out per-mode values.maxItems: 100
-
"fast" -
"standard"
-
-
user_ids: optional array of stringFilter to specific users by tagged user ID.
maxItems: 100
Returns
-
BetaUserUsage object-
data: array of objectRows for this page, ranked by
order_byin theorderdirection. One row per user, or several per user whengroup_by[]orbucket_widthbreaks that user's usage or cost out across rows. Rows split out bycost_typeortoken_type(cost endpoint only) stay adjacent and are ranked as one unit.-
actor: BetaAnalyticsUserActorThe user this row's usage or cost is attributed to. Always a
user_actor.-
type: "user_actor"Actor type. Always
"user_actor". -
deleted: booleanTrue when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider).
emailstays populated for removed users and is null when the account has been deleted.namefollows the rules described on that field. Theuser_idis still populated for reconciliation. -
email: string or nullThe 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 (checkname). -
name: string or nullThe user's full name. Null when the user has not set a name. Returns
"Deleted User"when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example,"Claude Security"for usage by Anthropic's security-patching service) or null. -
user_id: stringTagged user ID.
-
-
cache_creation: BetaCacheCreationThe number of input tokens for cache creation.
-
ephemeral_1h_input_tokens: numberThe number of input tokens used to create the 1 hour cache entry.
default: 0, minimum: 0
-
ephemeral_5m_input_tokens: numberThe number of input tokens used to create the 5 minute cache entry.
default: 0, minimum: 0
-
-
cache_read_input_tokens: numberThe number of input tokens read from the cache.
-
claude_tag_category: "dm" or "engaged" or "monitoring" or 2 more or nullClaude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). Populated only whenclaude_tag_categoryis ingroup_by[]; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not underclaude-tag. New categories may be added over time.-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_id: string or nullSlack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only whenclaude_tag_user_idis ingroup_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for examplemonitoring, andproactiveusage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined withgroup_by[]=rbac_group_idor therbac_group_ids[]filter. -
context_window: "0-200k" or "200k-1M" or nullContext-window pricing tier of the usage or cost. Null unless
context_windowis ingroup_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.-
"0-200k" -
"200k-1M"
-
-
ending_at: string or nullEnd of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to
starting_atplus onebucket_width. Null unlessbucket_widthis set.format: date-time
-
inference_geo: "global" or "us" or nullInference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).-
"global" -
"us"
-
-
model: string or nullModel that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5). Null unlessmodelis ingroup_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution. -
output_tokens: numberThe number of output tokens generated.
-
product: string or nullProduct 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 includechat,claude_code,cowork,office_agent,claude_in_chrome,claude_design, andclaude-tag.claude-tagis Claude Tag, the Claude product in Slack. Some unattributed usage is reported as "other". -
rbac_group_id: string or nullRBAC 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 anrbac_group_ids[]filter value. Populated only whenrbac_group_idis ingroup_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 withoutgroup_by[]. -
requests: number or nullNumber 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). -
server_tool_use: objectServer-side tool usage metrics.
-
web_search_requests: numberThe number of web search requests made.
-
-
slack_channel_id: string or nullSlack channel the usage originated from. Populated only when
slack_channel_idis ingroup_by[]; null for usage outside Slack (and for rows recorded before channel attribution was enabled). -
speed: "fast" or "standard" or nullInference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].-
"fast" -
"standard"
-
-
starting_at: string or nullStart of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless
bucket_widthis set; withoutbucket_width, each row aggregates the full requested range.format: date-time
-
total_tokens: numberTotal token count across all token types. This is the value the default
order_by(total_tokens) sorts on. -
uncached_input_tokens: numberThe number of uncached input tokens processed.
-
-
data_refreshed_at: string or nullRFC 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
datais empty. Data beyond this watermark is incomplete; for stable results, setending_atto 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).format: date-time
-
has_more: booleanWhether another page is available. When true, pass
next_pageas thepageparameter to fetch it. -
next_page: string or nullOpaque cursor for the next page, or null when
has_moreis false. Pass it as thepageparameter, 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. -
organization_id: stringID of the Organization.
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/user_usage_report \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"actor": {
"deleted": true,
"email": "jane@example.com",
"name": "Jane Smith",
"type": "user_actor",
"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"
},
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 0
},
"cache_read_input_tokens": 3200000,
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"ending_at": "2019-12-27T18:11:19.117Z",
"inference_geo": "global",
"model": "claude-opus-5",
"output_tokens": 891000,
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 128,
"server_tool_use": {
"web_search_requests": 10
},
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"starting_at": "2019-12-27T18:11:19.117Z",
"total_tokens": 5377000,
"uncached_input_tokens": 1284500
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Analytics › Cost
Get Cost Over Time
GET /v1/organizations/analytics/cost_report
Get cost in USD over time across a date range.
Returns cost bucketed by minute, hour, or day, optionally broken down by
product, model, context window, inference region, speed, cost type, or
token type. Available to organizations on a Claude Enterprise plan.
Requires an API key with the read:analytics scope.
Query parameters
-
starting_at: stringStart of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
format: date-time
-
bucket_width: optional "1d" or "1h" or "1m"Time bucket granularity.
default: 1d
-
"1d" -
"1h" -
"1m"
-
-
claude_tag_categories: optional array of "dm" or "engaged" or "monitoring" or 2 moreFilter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches.
dmusage is reported under the user's product rather thanclaude-tag, so combining this filter withproducts[]=claude-tagexcludes it. Usegroup_by[]=claude_tag_categoryto break out per-category values.maxItems: 100
-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_ids: optional array of stringFilter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Usegroup_by[]=claude_tag_user_idto break out per-user values.maxItems: 100
-
context_windows: optional array of "0-200k" or "200k-1M"Filter to specific context-window pricing tiers. Use
group_by[]=context_windowto break out per-tier values.maxItems: 100
-
"0-200k" -
"200k-1M"
-
-
ending_at: optional stringEnd of range, exclusive. When omitted, defaults to the earlier of now and
starting_at+ 31 days. The range may span at most 31 days.format: date-time
-
group_by: optional array of "claude_tag_category" or "claude_tag_user_id" or "context_window" or 8 moreDimensions 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.
maxItems: 100
-
"claude_tag_category" -
"claude_tag_user_id" -
"context_window" -
"cost_type" -
"inference_geo" -
"model" -
"product" -
"rbac_group_id" -
"slack_channel_id" -
"speed" -
"token_type"
-
-
inference_geos: optional array of "global" or "not_available" or "us"Filter to specific inference regions.
not_availablematches rows where the region is unset. Usegroup_by[]=inference_geoto break out per-region values.maxItems: 100
-
"global" -
"not_available" -
"us"
-
-
limit: optional numberMaximum 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).minimum: 1
-
models: optional array of stringModels to include. Defaults to all models. Use
group_by[]=modelto break out per-model values.maxItems: 100
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
products: optional array of "chat" or "claude-tag" or "claude_code" or 4 moreProduct surfaces to include. Defaults to all products. Use
group_by[]=productto break out per-product values.maxItems: 100
-
"chat" -
"claude-tag" -
"claude_code" -
"claude_design" -
"claude_in_chrome" -
"cowork" -
"office_agent"
-
-
rbac_group_ids: optional array of stringFilter 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.maxItems: 100
-
slack_channel_ids: optional array of stringFilter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_idto break out per-channel values.maxItems: 100
-
speeds: optional array of "fast" or "standard"Filter to fast or standard inference mode. Use
group_by[]=speedto break out per-mode values.maxItems: 100
-
"fast" -
"standard"
-
-
user_ids: optional array of stringFilter to specific users by tagged user ID.
maxItems: 100
Returns
-
BetaCostBucket object-
data: array of objectTime buckets for this page, oldest first: one per
bucket_widthinterval, including intervals with no data (theirresultslist is empty). A page holds at mostlimitbuckets.-
ending_at: stringEnd of the time bucket (exclusive) in RFC 3339 format.
format: date-time
-
results: array of objectRows 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 thegroup_by[]parameter).-
amount: stringAmount (post-discount, pre-credit) in fractional cents.
-
claude_tag_category: "dm" or "engaged" or "monitoring" or 2 more or nullClaude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). Populated only whenclaude_tag_categoryis ingroup_by[]; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not underclaude-tag. New categories may be added over time.-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_id: string or nullSlack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only whenclaude_tag_user_idis ingroup_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for examplemonitoring, andproactiveusage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined withgroup_by[]=rbac_group_idor therbac_group_ids[]filter. -
context_window: "0-200k" or "200k-1M" or nullContext-window pricing tier of the usage or cost. Null unless
context_windowis ingroup_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.-
"0-200k" -
"200k-1M"
-
-
cost_type: "code_execution" or "tokens" or "web_search" or nullCost component when
group_by[]=cost_type; null otherwise (amount is the combined total).-
"code_execution" -
"tokens" -
"web_search"
-
-
currency: "USD"Currency code for the cost amount. Currently always
"USD".default: USD
-
inference_geo: "global" or "us" or nullInference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).-
"global" -
"us"
-
-
list_amount: stringList-price amount (pre-discount) in fractional cents.
-
model: string or nullModel that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5). Null unlessmodelis ingroup_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution. -
product: string or nullProduct 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 includechat,claude_code,cowork,office_agent,claude_in_chrome,claude_design, andclaude-tag.claude-tagis Claude Tag, the Claude product in Slack. Some unattributed usage is reported as "other". -
rbac_group_id: string or nullRBAC 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 anrbac_group_ids[]filter value. Populated only whenrbac_group_idis ingroup_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 withoutgroup_by[]. -
requests: number or nullNumber of API requests in this row's scope. Null when
group_byincludescost_typeortoken_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 withproduct: null). -
slack_channel_id: string or nullSlack channel the usage originated from. Populated only when
slack_channel_idis ingroup_by[]; null for usage outside Slack (and for rows recorded before channel attribution was enabled). -
speed: "fast" or "standard" or nullInference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].-
"fast" -
"standard"
-
-
token_type: "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more or nullToken type when
group_by[]=token_typeandcost_type=tokens; null otherwise.-
"cache_creation.ephemeral_1h_input_tokens" -
"cache_creation.ephemeral_5m_input_tokens" -
"cache_read_input_tokens" -
"output_tokens" -
"uncached_input_tokens"
-
-
-
starting_at: stringStart of the time bucket (inclusive) in RFC 3339 format.
format: date-time
-
-
data_refreshed_at: string or nullRFC 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
resultslist is empty. Buckets beyond this watermark are incomplete; for stable results, setending_atto 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).format: date-time
-
has_more: booleanWhether another page is available. When true, pass
next_pageas thepageparameter to fetch it. -
next_page: string or nullOpaque cursor for the next page, or null when
has_moreis false. Pass it as thepageparameter, 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. -
organization_id: stringID of the Organization.
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/cost_report \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"ending_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"amount": "amount",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"inference_geo": "global",
"list_amount": "list_amount",
"model": "claude-opus-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 0,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"starting_at": "2019-12-27T18:11:19.117Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Get Per-User Cost
GET /v1/organizations/analytics/user_cost_report
Get per-user cost in USD across a date range.
Returns one row per user, ranked by spend. Use this to see which users
account for the most cost. Only cost attributable to a seat user is
included; for organization-wide totals including direct API-key and
automation traffic, use the bucketed
/v1/organizations/analytics/cost_report endpoint. Available to
organizations on a Claude Enterprise plan. Requires an API key with the
read:analytics scope.
Query parameters
-
starting_at: stringStart of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
format: date-time
-
bucket_width: optional "1d" or "1h" or "1m"Time-bucket granularity. When set, each row's
starting_atandending_atare populated and one actor may span several rows (one per time bucket with usage). The time bucket counts towardlimit, so one page can return multiple rows for the same actor.ending_atis required whenbucket_widthis set, and withbucket_width="1m"the range may span at most 24 hours. When omitted, each row aggregates the full[starting_at, ending_at)range.-
"1d" -
"1h" -
"1m"
-
-
claude_tag_categories: optional array of "dm" or "engaged" or "monitoring" or 2 moreFilter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches.
dmusage is reported under the user's product rather thanclaude-tag, so combining this filter withproducts[]=claude-tagexcludes it. Usegroup_by[]=claude_tag_categoryto break out per-category values.maxItems: 100
-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_ids: optional array of stringFilter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Usegroup_by[]=claude_tag_user_idto break out per-user values.maxItems: 100
-
context_windows: optional array of "0-200k" or "200k-1M"Filter to specific context-window pricing tiers. Use
group_by[]=context_windowto break out per-tier values.maxItems: 100
-
"0-200k" -
"200k-1M"
-
-
ending_at: optional stringEnd of range, exclusive. When omitted, defaults to the earlier of now and
starting_at+ 31 days. The range may span at most 31 days.format: date-time
-
exclude_deleted_users: optional booleanIf true, omit rows for users who are deleted (
deleted: true). A page may contain fewer thanlimitrows; usehas_moreandnext_pageto paginate as usual.default: false
-
group_by: optional array of "claude_tag_category" or "claude_tag_user_id" or "context_window" or 8 moreBreak each actor's row out by the given dimensions. Accepts the same values as the bucketed
/cost_reportendpoint. Theproduct,model,context_window,inference_geo, andspeeddimensions — and the time bucket, whenbucket_widthis set — count towardlimit.cost_typeandtoken_typedo not:cost_typereturns one row per cost component (tokens, web search, code execution);token_typereturns one row per token type, each withcost_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 thanlimitwhencost_typeortoken_typeis requested.maxItems: 100
-
"claude_tag_category" -
"claude_tag_user_id" -
"context_window" -
"cost_type" -
"inference_geo" -
"model" -
"product" -
"rbac_group_id" -
"slack_channel_id" -
"speed" -
"token_type"
-
-
inference_geos: optional array of "global" or "not_available" or "us"Filter to specific inference regions.
not_availablematches rows where the region is unset. Usegroup_by[]=inference_geoto break out per-region values.maxItems: 100
-
"global" -
"not_available" -
"us"
-
-
limit: optional numberNumber of rows per page (1-1000, default 20). One row per actor unless
group_by[]orbucket_widthsplits an actor across rows;cost_type/token_typefan-out rows (cost endpoint only) are the exception — they do not count toward this limit, sodatacan exceed it.default: 20, maximum: 1000, minimum: 1
-
models: optional array of stringModels to include. Defaults to all models. Use
group_by[]=modelto break out per-model values.maxItems: 100
-
order: optional "asc" or "desc"Sort direction. Defaults to
desc.default: desc
-
"asc" -
"desc"
-
-
order_by: optional "amount" or "list_amount"Metric to rank actors by. Defaults to
amount.default: amount
-
"amount" -
"list_amount"
-
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
products: optional array of "chat" or "claude-tag" or "claude_code" or 4 moreProduct surfaces to include. Defaults to all products.
maxItems: 100
-
"chat" -
"claude-tag" -
"claude_code" -
"claude_design" -
"claude_in_chrome" -
"cowork" -
"office_agent"
-
-
rbac_group_ids: optional array of stringFilter 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.maxItems: 100
-
slack_channel_ids: optional array of stringFilter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_idto break out per-channel values.maxItems: 100
-
speeds: optional array of "fast" or "standard"Filter to fast or standard inference mode. Use
group_by[]=speedto break out per-mode values.maxItems: 100
-
"fast" -
"standard"
-
-
user_ids: optional array of stringFilter to specific users by tagged user ID.
maxItems: 100
Returns
-
BetaUserCost object-
data: array of objectRows for this page, ranked by
order_byin theorderdirection. One row per user, or several per user whengroup_by[]orbucket_widthbreaks that user's usage or cost out across rows. Rows split out bycost_typeortoken_type(cost endpoint only) stay adjacent and are ranked as one unit.-
actor: BetaAnalyticsUserActorThe user this row's usage or cost is attributed to. Always a
user_actor.-
type: "user_actor"Actor type. Always
"user_actor". -
deleted: booleanTrue when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider).
emailstays populated for removed users and is null when the account has been deleted.namefollows the rules described on that field. Theuser_idis still populated for reconciliation. -
email: string or nullThe 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 (checkname). -
name: string or nullThe user's full name. Null when the user has not set a name. Returns
"Deleted User"when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example,"Claude Security"for usage by Anthropic's security-patching service) or null. -
user_id: stringTagged user ID.
-
-
amount: stringAmount (post-discount, pre-credit) in fractional cents (minor units).
-
claude_tag_category: "dm" or "engaged" or "monitoring" or 2 more or nullClaude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). Populated only whenclaude_tag_categoryis ingroup_by[]; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not underclaude-tag. New categories may be added over time.-
"dm" -
"engaged" -
"monitoring" -
"proactive" -
"scheduled"
-
-
claude_tag_user_id: string or nullSlack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only whenclaude_tag_user_idis ingroup_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for examplemonitoring, andproactiveusage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined withgroup_by[]=rbac_group_idor therbac_group_ids[]filter. -
context_window: "0-200k" or "200k-1M" or nullContext-window pricing tier of the usage or cost. Null unless
context_windowis ingroup_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.-
"0-200k" -
"200k-1M"
-
-
cost_type: "code_execution" or "tokens" or "web_search" or nullCost component breakdown; null when returning the combined total.
-
"code_execution" -
"tokens" -
"web_search"
-
-
currency: "USD"Currency code for the cost amount. Currently always
"USD".default: USD
-
ending_at: string or nullEnd of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to
starting_atplus onebucket_width. Null unlessbucket_widthis set.format: date-time
-
inference_geo: "global" or "us" or nullInference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).-
"global" -
"us"
-
-
list_amount: stringList-price amount (pre-discount) in fractional cents.
-
model: string or nullModel that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5). Null unlessmodelis ingroup_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution. -
product: string or nullProduct 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 includechat,claude_code,cowork,office_agent,claude_in_chrome,claude_design, andclaude-tag.claude-tagis Claude Tag, the Claude product in Slack. Some unattributed usage is reported as "other". -
rbac_group_id: string or nullRBAC 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 anrbac_group_ids[]filter value. Populated only whenrbac_group_idis ingroup_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 withoutgroup_by[]. -
requests: number or nullNumber of API requests in this row's scope. Null when
group_byincludescost_typeortoken_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 withproduct: null). -
slack_channel_id: string or nullSlack channel the usage originated from. Populated only when
slack_channel_idis ingroup_by[]; null for usage outside Slack (and for rows recorded before channel attribution was enabled). -
speed: "fast" or "standard" or nullInference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].-
"fast" -
"standard"
-
-
starting_at: string or nullStart of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless
bucket_widthis set; withoutbucket_width, each row aggregates the full requested range.format: date-time
-
token_type: "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more or nullToken type when
cost_typeistokens; null otherwise.-
"cache_creation.ephemeral_1h_input_tokens" -
"cache_creation.ephemeral_5m_input_tokens" -
"cache_read_input_tokens" -
"output_tokens" -
"uncached_input_tokens"
-
-
-
data_refreshed_at: string or nullRFC 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
datais empty. Data beyond this watermark is incomplete; for stable results, setending_atto 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).format: date-time
-
has_more: booleanWhether another page is available. When true, pass
next_pageas thepageparameter to fetch it. -
next_page: string or nullOpaque cursor for the next page, or null when
has_moreis false. Pass it as thepageparameter, 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. -
organization_id: stringID of the Organization.
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/user_cost_report \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"actor": {
"deleted": true,
"email": "jane@example.com",
"name": "Jane Smith",
"type": "user_actor",
"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"
},
"amount": "41280.000000",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"ending_at": "2019-12-27T18:11:19.117Z",
"inference_geo": "global",
"list_amount": "51600.000000",
"model": "claude-opus-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 128,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"starting_at": "2019-12-27T18:11:19.117Z",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Analytics › Users
List User Activity
GET /v1/organizations/analytics/users
Get per-user activity for a given day, with cursor-based pagination.
Returns activity metrics for each user in the organization, sorted by email
address. Use group_by[] for per-RBAC-group aggregates, or filter[] to
scope results to specific members, groups, or a chat project. Available
to organizations on a Claude Enterprise plan. Requires an API key with
the read:analytics scope.
Query parameters
-
date: optional stringUTC 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.
format: date
-
ending_date: optional stringUTC 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 afterstarting_date.format: date
-
filter: optional array of stringFilters 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_idtakes 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 withgroup_by[]or anrbac_group_idfilter);rbac_group_idtakes 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_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "rbac_group_id"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 vianext_page; an unsupported dimension returns 400.rbac_group_idattributes 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.maxItems: 100
-
limit: optional numberNumber of results per page (1-1000, default 100).
minimum: 1, maximum: 1000
-
order: optional "asc" or "desc"Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.-
"asc" -
"desc"
-
-
order_by: optional stringSort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
starting_date: optional stringUTC 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
dateorstarting_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.format: date
Returns
-
BetaUserActivity objectResponse for GET /v1/organizations/analytics/users.
-
data: array of object-
chat_metrics: objectClaude.ai activity metrics for a single user on a given day.
-
connectors_used_count: numberNumber of MCP connector invocations.
-
distinct_artifacts_created_count: numberNumber 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.
-
distinct_connectors_used_count: number or nullDistinct 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.
-
distinct_conversation_count: number or nullNumber 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.
-
distinct_files_uploaded_count: number or nullNumber of distinct files uploaded. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
distinct_projects_created_count: numberNumber 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.
-
distinct_projects_used_count: number or nullNumber of distinct projects used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
distinct_shared_artifacts_viewed_count: number or nullNumber 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.
-
distinct_skills_used_count: number or nullNumber of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
message_count: numberNumber of messages sent
-
shared_conversations_viewed_count: numberNumber of times the user opened a shared conversation in a project
-
thinking_message_count: numberNumber of messages that used extended thinking
-
-
claude_code_metrics: objectClaude Code activity metrics for a single user on a given day.
-
core_metrics: objectCore Claude Code activity metrics for a single user on a given day.
-
artifacts_created_count: numberNumber of artifacts created in Claude Code sessions: an artifact counts once, on the day a session first saves it. Counted from 2026-08-17; 0 on earlier days. 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.
-
commit_count: numberNumber of commits made via Claude Code
-
distinct_session_count: number or nullNumber 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.
-
lines_of_code: objectLines of code added and removed via Claude Code.
-
added_count: numberLines of code added
-
removed_count: numberLines of code removed
-
-
pull_request_count: numberNumber of pull requests created via Claude Code
-
-
tool_actions: objectPer-tool accepted/rejected counts for Claude Code file modification tools.
-
edit_tool: BetaToolActionCountsAccepted/rejected counts for a single Claude Code tool type.
-
accepted_count: numberNumber of tool proposals accepted
-
rejected_count: numberNumber of tool proposals rejected
-
-
multi_edit_tool: BetaToolActionCountsAccepted/rejected counts for a single Claude Code tool type.
-
notebook_edit_tool: BetaToolActionCountsAccepted/rejected counts for a single Claude Code tool type.
-
write_tool: BetaToolActionCountsAccepted/rejected counts for a single Claude Code tool type.
-
-
-
cowork_metrics: objectCowork activity metrics for a single user on a given day.
-
action_count: numberNumber of tool actions completed in Cowork sessions
-
artifacts_created_count: numberNumber of artifacts created in Cowork sessions: an artifact counts once, on the day a session first saves it. Counted from 2026-08-17; 0 on earlier days. 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.
-
connectors_used_count: numberTotal number of connector invocations in Cowork sessions
-
dispatch_turn_count: numberNumber of Dispatch (background agent) turns completed
-
distinct_connectors_used_count: number or nullNumber 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.
-
distinct_session_count: number or nullNumber of distinct Cowork sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
distinct_skills_used_count: number or nullNumber 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.
-
message_count: numberNumber of messages sent in Cowork sessions
-
skills_used_count: numberTotal number of skill invocations in Cowork sessions
-
distinct_plugins_used_count: optional number or nullNumber 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.
-
edit_tool_count: optional number or nullNumber of successful Edit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
-
file_edit_count: optional number or nullNumber 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.
-
multi_edit_tool_count: optional number or nullNumber of successful MultiEdit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
-
notebook_edit_tool_count: optional number or nullNumber of successful NotebookEdit tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
-
plugins_used_count: optional number or nullTotal number of plugin invocations in Cowork sessions. Null while Cowork plugin-use metrics are not enabled for this organization.
-
sessions_with_file_edits_count: optional number or nullNumber 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.
-
write_tool_count: optional number or nullNumber of successful Write tool calls in Cowork sessions. Null while the file-edit metrics are not enabled for this organization.
-
-
design_metrics: objectClaude Design activity metrics for a single user on a given day.
-
distinct_projects_created_count: numberNumber 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.
-
distinct_projects_used_count: number or nullNumber 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.
-
distinct_session_count: number or nullNumber 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.
-
message_count: numberNumber of messages sent in Claude Design sessions
-
-
office_metrics: objectOffice Agent activity metrics for a single user on a given day, broken out by Office product.
-
excel: BetaOfficeProductMetricsOffice Agent activity metrics for a single user on a given day within one Office product.
-
connectors_used_count: numberNumber of MCP connector invocations
-
distinct_connectors_used_count: number or nullNumber 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.
-
distinct_session_count: number or nullNumber 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.
-
distinct_skills_used_count: number or nullNumber of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
-
message_count: numberNumber of messages sent
-
skills_used_count: numberNumber of skill invocations
-
-
outlook: BetaOfficeProductMetricsOffice Agent activity metrics for a single user on a given day within one Office product.
-
powerpoint: BetaOfficeProductMetricsOffice Agent activity metrics for a single user on a given day within one Office product.
-
word: BetaOfficeProductMetricsOffice Agent activity metrics for a single user on a given day within one Office product.
-
-
science_metrics: objectClaude Science activity metrics for a single user on a given day.
-
delegation_count: numberNumber of delegations (handoffs to a specialized agent) in Claude Science sessions
-
distinct_session_count: number or nullNumber 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.
-
message_count: numberNumber of messages sent in Claude Science sessions
-
remote_compute_job_count: numberNumber of remote compute jobs launched from Claude Science sessions
-
skills_used_count: numberTotal number of skill invocations in Claude Science sessions
-
-
web_search_count: numberNumber of web searches performed
-
distinct_user_count: optional number or nullNumber 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. -
last_activity_date: optional string or nullMost recent UTC day (YYYY-MM-DD) on which the user had any counted activity, within the requested window: equal to the requested
datein single-day mode, and to the latest active day fromstarting_date(inclusive) toending_date(exclusive) in date-range rollup mode — never a day earlier than the window start. On filtered requests (filter[]) only days matching the filter count: withfilter[]=rbac_group_id:{id}it is the last day the user was active while a member of that group, consistent with the row's other metrics. On grouped (group_by[]) rows it is the latest day any member of the group was active (the requesteddatein single-day mode). Omitted from the response while last-activity reporting is not enabled for this organization.format: date
-
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
user: optional BetaAnalyticsUser or nullA user in the organization, identified by tagged id and email address.
-
type: "user"Object type. Always
user.default: user
-
id: stringTagged user identifier (e.g.
user_...) -
email_address: stringEmail address of the user
-
-
-
next_page: string or nullOpaque cursor for the next page, or null if no more results
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/users \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"chat_metrics": {
"connectors_used_count": 0,
"distinct_artifacts_created_count": 0,
"distinct_connectors_used_count": 0,
"distinct_conversation_count": 0,
"distinct_files_uploaded_count": 0,
"distinct_projects_created_count": 0,
"distinct_projects_used_count": 0,
"distinct_shared_artifacts_viewed_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"shared_conversations_viewed_count": 0,
"thinking_message_count": 0
},
"claude_code_metrics": {
"core_metrics": {
"artifacts_created_count": 0,
"commit_count": 0,
"distinct_session_count": 0,
"lines_of_code": {
"added_count": 0,
"removed_count": 0
},
"pull_request_count": 0
},
"tool_actions": {
"edit_tool": {
"accepted_count": 0,
"rejected_count": 0
},
"multi_edit_tool": {
"accepted_count": 0,
"rejected_count": 0
},
"notebook_edit_tool": {
"accepted_count": 0,
"rejected_count": 0
},
"write_tool": {
"accepted_count": 0,
"rejected_count": 0
}
}
},
"cowork_metrics": {
"action_count": 0,
"artifacts_created_count": 0,
"connectors_used_count": 0,
"dispatch_turn_count": 0,
"distinct_connectors_used_count": 0,
"distinct_session_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"skills_used_count": 0,
"distinct_plugins_used_count": 0,
"edit_tool_count": 0,
"file_edit_count": 0,
"multi_edit_tool_count": 0,
"notebook_edit_tool_count": 0,
"plugins_used_count": 0,
"sessions_with_file_edits_count": 0,
"write_tool_count": 0
},
"design_metrics": {
"distinct_projects_created_count": 0,
"distinct_projects_used_count": 0,
"distinct_session_count": 0,
"message_count": 0
},
"office_metrics": {
"excel": {
"connectors_used_count": 0,
"distinct_connectors_used_count": 0,
"distinct_session_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"skills_used_count": 0
},
"outlook": {
"connectors_used_count": 0,
"distinct_connectors_used_count": 0,
"distinct_session_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"skills_used_count": 0
},
"powerpoint": {
"connectors_used_count": 0,
"distinct_connectors_used_count": 0,
"distinct_session_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"skills_used_count": 0
},
"word": {
"connectors_used_count": 0,
"distinct_connectors_used_count": 0,
"distinct_session_count": 0,
"distinct_skills_used_count": 0,
"message_count": 0,
"skills_used_count": 0
}
},
"science_metrics": {
"delegation_count": 0,
"distinct_session_count": 0,
"message_count": 0,
"remote_compute_job_count": 0,
"skills_used_count": 0
},
"web_search_count": 0,
"distinct_user_count": 0,
"last_activity_date": "2019-12-27",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user": {
"id": "id",
"email_address": "email_address",
"type": "user"
}
}
],
"next_page": "next_page"
}Analytics › Skills
Get Skill Usage
GET /v1/organizations/analytics/skills
Get per-skill usage for a given day, with cursor-based pagination.
Returns skill usage metrics for the organization, sorted by skill name.
Use group_by[] to break usage out per member, per RBAC group, or per
product surface, and filter[] to scope results; the parameter
descriptions list the supported dimensions. Available to organizations
on a Claude Enterprise plan. Requires an API key with the
read:analytics scope.
Query parameters
-
date: optional stringUTC 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.
format: date
-
ending_date: optional stringUTC 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 afterstarting_date.format: date
-
filter: optional array of stringFilters 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:productis one ofchat,claude_code,cowork, oroffice_agent;rbac_group_idtakes 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_statusis one oforganization,private, orpublic;skill_namematches case-insensitively;user_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "product" or "rbac_group_id" or "user_id"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 vianext_page; an unsupported dimension returns 400.rbac_group_idattributes 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.maxItems: 100
-
"product" -
"rbac_group_id" -
"user_id"
-
-
limit: optional numberNumber of results per page (1-1000, default 100).
minimum: 1, maximum: 1000
-
order: optional "asc" or "desc"Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.-
"asc" -
"desc"
-
-
order_by: optional stringSort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
starting_date: optional stringUTC 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
dateorstarting_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.format: date
Returns
-
BetaSkillUsage objectResponse for GET /v1/organizations/analytics/skills.
-
data: array of object-
chat_metrics: objectClaude.ai activity metrics for a single skill on a given day.
-
distinct_conversation_skill_used_count: number or nullNumber 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.
-
-
claude_code_metrics: objectClaude Code activity metrics for a single skill on a given day.
-
distinct_session_skill_used_count: number or nullNumber 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.
-
-
cowork_metrics: objectCowork activity metrics for a single skill on a given day.
-
distinct_session_skill_used_count: number or nullNumber 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.
-
-
distinct_user_count: numberNumber 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.
-
office_metrics: objectOffice Agent activity metrics for a single skill on a given day, broken out by Office product.
-
excel: BetaSkillOfficeProductMetricsOffice Agent activity metrics for a single skill on a given day within one Office product.
-
distinct_session_skill_used_count: number or nullNumber 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.
-
-
outlook: BetaSkillOfficeProductMetricsOffice Agent activity metrics for a single skill on a given day within one Office product.
-
powerpoint: BetaSkillOfficeProductMetricsOffice Agent activity metrics for a single skill on a given day within one Office product.
-
word: BetaSkillOfficeProductMetricsOffice Agent activity metrics for a single skill on a given day within one Office product.
-
-
skill_name: stringName of the skill
-
attributed_list_price: optional string or nullList-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. Unlikeestimated_overage_spendthis 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 onchatproduct rows and onoffice_agentproduct 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 asestimated_overage_spend(spend reporting not enabled for this organization,office_agentproduct 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. Ongroup_by[]andfilter[]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. -
currency: optional "USD" or nullCurrency for this row's monetary fields (
estimated_overage_spendandattributed_list_price), as an uppercase ISO-4217 code. Always "USD" when either amount is populated; null whenever both amounts are null. -
enable_count: optional number or nullDistinct 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 touser_id/rbac_group_id/productviagroup_by[]orfilter[](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). -
estimated_overage_spend: optional string or nullEstimated 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 — seeattributed_list_pricefor 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, onoffice_agentproduct 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. Withgroup_by[]=user_ideach row carries the user's own attributed spend. Ongroup_by[]andfilter[]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. -
invocation_count: optional number or nullTotal number of times this skill was invoked on the requested day (the skill analog of plugin
invocation_count). Unlikedistinct_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. -
product: optional string or nullProduct that produced this row's activity: one of
chat,claude_code,cowork, oroffice_agent(the canonical Cost & Usage product naming; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics). On/pluginsonlycoworkandclaude_codeoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code, andcoworkoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct. -
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
share_status: optional "organization" or "private" or "public" or nullSkill share status (claude.ai only): one of
private,organization, orpublic. 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 viafilter[]=share_status:{value}.-
"organization" -
"private" -
"public"
-
-
skill_display_name: optional string or nullHuman-readable display name for rows whose
skill_nameis an opaque skill id (user/organization skill types and plugin-delivered skills — user-defined names are withheld from the analytics pipeline). Organization-shared skills and skills delivered by the organization's own plugins (its plugin marketplaces and its library) resolve; plugin skill names are shown without their 'plugin:' prefix. The literal 'unknown' bucket row gets a fixed 'Unknown skill' label. Null for private (user-defined) skills and members' personal-plugin skills — those names are not disclosed to analytics-key holders — and for Anthropic-provided plugin skills (not resolved), and null whenskill_nameis already a display name, when the skill or plugin was deleted, or when display-name resolution is not enabled for this organization. -
user_id: optional string or nullTagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
-
next_page: string or nullOpaque cursor for the next page, or null if no more results
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/skills \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"chat_metrics": {
"distinct_conversation_skill_used_count": 0
},
"claude_code_metrics": {
"distinct_session_skill_used_count": 0
},
"cowork_metrics": {
"distinct_session_skill_used_count": 0
},
"distinct_user_count": 0,
"office_metrics": {
"excel": {
"distinct_session_skill_used_count": 0
},
"outlook": {
"distinct_session_skill_used_count": 0
},
"powerpoint": {
"distinct_session_skill_used_count": 0
},
"word": {
"distinct_session_skill_used_count": 0
}
},
"skill_name": "skill_name",
"attributed_list_price": "attributed_list_price",
"currency": "USD",
"enable_count": 0,
"estimated_overage_spend": "estimated_overage_spend",
"invocation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"share_status": "organization",
"skill_display_name": "skill_display_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Analytics › Connectors
Get Connector Usage
GET /v1/organizations/analytics/connectors
Get per-connector usage for a given day, with cursor-based pagination.
Returns connector usage metrics for the organization, sorted by connector
name. Connector names are normalized from their various sources — for
example, "Atlassian MCP server" and "mcp-atlassian" both appear as
"atlassian". Use group_by[] to break usage out per member, per RBAC
group, or per product surface, and filter[] to scope results; the
parameter descriptions list the supported dimensions. Available to
organizations on a Claude Enterprise plan. Requires an API key with the
read:analytics scope.
Query parameters
-
date: optional stringUTC 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.
format: date
-
ending_date: optional stringUTC 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 afterstarting_date.format: date
-
filter: optional array of stringFilters 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_namematches case-insensitively, a display name such as 'GitHub MCP' also matches its normalized stored form ('github'), and for rows whoseconnector_nameis an opaque connector id the connector's display name (connector_display_name) also matches;productis one ofchat,claude_code,cowork, oroffice_agent;rbac_group_idtakes 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_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "product" or "rbac_group_id" or "user_id"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 vianext_page; an unsupported dimension returns 400.rbac_group_idattributes 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.maxItems: 100
-
"product" -
"rbac_group_id" -
"user_id"
-
-
limit: optional numberNumber of results per page (1-1000, default 100).
minimum: 1, maximum: 1000
-
order: optional "asc" or "desc"Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.-
"asc" -
"desc"
-
-
order_by: optional stringSort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
starting_date: optional stringUTC 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
dateorstarting_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.format: date
Returns
-
BetaConnectorUsage objectResponse for GET /v1/organizations/analytics/connectors.
-
data: array of object-
chat_metrics: objectClaude.ai activity metrics for a single connector on a given day.
-
distinct_conversation_connector_used_count: number or nullNumber 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.
-
-
claude_code_metrics: objectClaude Code activity metrics for a single connector on a given day.
-
distinct_session_connector_used_count: number or nullNumber 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.
-
-
connector_name: stringName of the connector. Some rows carry an opaque connector id here instead of a readable name;
connector_display_nameholds the resolved name for those rows. -
cowork_metrics: objectCowork activity metrics for a single connector on a given day.
-
distinct_session_connector_used_count: number or nullNumber 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.
-
-
distinct_user_count: numberNumber 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.
-
office_metrics: objectOffice Agent activity metrics for a single connector on a given day, broken out by Office product.
-
excel: BetaConnectorOfficeProductMetricsOffice Agent activity metrics for a single connector on a given day within one Office product.
-
distinct_session_connector_used_count: number or nullNumber 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.
-
-
outlook: BetaConnectorOfficeProductMetricsOffice Agent activity metrics for a single connector on a given day within one Office product.
-
powerpoint: BetaConnectorOfficeProductMetricsOffice Agent activity metrics for a single connector on a given day within one Office product.
-
word: BetaConnectorOfficeProductMetricsOffice Agent activity metrics for a single connector on a given day within one Office product.
-
-
connector_display_name: optional string or nullHuman-readable display name for rows whose
connector_nameis 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_nameremains the row's stable key for sorting and pagination, andfilter[]=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 readableconnector_name. Null whenconnector_nameis 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. -
individual_auth_distinct_user_count: optional number or nullNumber 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. -
managed_auth_distinct_user_count: optional number or nullNumber 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_idandrbac_group_idcuts — attributed to the user the credential was provisioned for — but never on a cut that referencesproduct(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. -
product: optional string or nullProduct that produced this row's activity: one of
chat,claude_code,cowork, oroffice_agent(the canonical Cost & Usage product naming; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics). On/pluginsonlycoworkandclaude_codeoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code, andcoworkoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct. -
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
read_call_count: optional number or nullNumber 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, orunclassified_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 inunclassified_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. -
unclassified_call_count: optional number or nullNumber 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_countfor the per-surface data-start dates, null conditions, and date-range guidance. -
user_id: optional string or nullTagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id. -
write_call_count: optional number or nullNumber 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_countfor the per-surface data-start dates, null conditions, and date-range guidance.
-
-
next_page: string or nullOpaque cursor for the next page, or null if no more results
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/connectors \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"chat_metrics": {
"distinct_conversation_connector_used_count": 0
},
"claude_code_metrics": {
"distinct_session_connector_used_count": 0
},
"connector_name": "connector_name",
"cowork_metrics": {
"distinct_session_connector_used_count": 0
},
"distinct_user_count": 0,
"office_metrics": {
"excel": {
"distinct_session_connector_used_count": 0
},
"outlook": {
"distinct_session_connector_used_count": 0
},
"powerpoint": {
"distinct_session_connector_used_count": 0
},
"word": {
"distinct_session_connector_used_count": 0
}
},
"connector_display_name": "connector_display_name",
"individual_auth_distinct_user_count": 0,
"managed_auth_distinct_user_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"read_call_count": 0,
"unclassified_call_count": 0,
"user_id": "user_id",
"write_call_count": 0
}
],
"next_page": "next_page"
}Analytics › Chat Projects
Get Chat Project Usage
GET /v1/organizations/analytics/apps/chat/projects
Get per-project activity for a given day, with cursor-based pagination.
Returns activity metrics for each project in the organization, sorted by
project ID. Use group_by[] to break projects out per member or per RBAC
group, and filter[] to scope results; the parameter descriptions list the
supported dimensions. Available to organizations on a Claude Enterprise
plan. Requires an API key with the read:analytics scope.
Query parameters
-
date: optional stringUTC 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.
format: date
-
ending_date: optional stringUTC 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 afterstarting_date.format: date
-
filter: optional array of stringFilters 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_idtakes a tagged project id (claude_proj_...);rbac_group_idtakes 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_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "rbac_group_id" or "user_id"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 vianext_page; an unsupported dimension returns 400.rbac_group_idattributes 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.maxItems: 100
-
"rbac_group_id" -
"user_id"
-
-
limit: optional numberNumber of results per page (1-1000, default 100).
minimum: 1, maximum: 1000
-
order: optional "asc" or "desc"Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.-
"asc" -
"desc"
-
-
order_by: optional stringSort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
starting_date: optional stringUTC 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
dateorstarting_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.format: date
Returns
-
BetaChatProjectUsage objectResponse for GET /v1/organizations/analytics/apps/chat/projects.
-
data: array of object-
distinct_user_count: numberNumber 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.
-
message_count: numberNumber of messages sent in the project on the requested day
-
project_id: stringTagged project identifier (e.g.
claude_proj_...) -
project_name: stringName of the project
-
created_at: optional string or nullProject creation timestamp in RFC 3339 format. Null if the project was deleted before attribution was recorded.
format: date-time
-
created_by: optional BetaAnalyticsUser or nullA user in the organization, identified by tagged id and email address.
-
type: "user"Object type. Always
user.default: user
-
id: stringTagged user identifier (e.g.
user_...) -
email_address: stringEmail address of the user
-
-
distinct_conversation_count: optional number or nullNumber of distinct conversations in the project. Null on aggregated rows where a distinct count cannot be computed.
-
product: optional string or nullProduct that produced this row's activity: one of
chat,claude_code,cowork, oroffice_agent(the canonical Cost & Usage product naming; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics). On/pluginsonlycoworkandclaude_codeoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code, andcoworkoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct. -
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
user_id: optional string or nullTagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
-
next_page: string or nullOpaque cursor for the next page, or null if no more results
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/apps/chat/projects \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"distinct_user_count": 0,
"message_count": 0,
"project_id": "project_id",
"project_name": "project_name",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"email_address": "email_address",
"type": "user"
},
"distinct_conversation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Analytics › Plugins
Get Plugin Usage
GET /v1/organizations/analytics/plugins
Get per-plugin install + invocation usage for a given day, with pagination.
Returns plugin usage metrics for the organization across Cowork and Claude
Code, sorted by plugin name. The plugin_name value third-party is
an aggregate bucket, not a plugin: it collects plugin activity, from
either surface, for which the reporting client did not provide a plugin
name — so an organization's own plugins can contribute both to their own
named rows and to this bucket. Use group_by[] to break usage out per
member, per RBAC group, or per product surface (Cowork / Claude Code),
and filter[] to scope results; the parameter descriptions list the
supported dimensions. Requires an API key with the
read:analytics scope. starting_date / ending_date select
range-rollup mode like /skills.
Query parameters
-
date: optional stringUTC 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.
format: date
-
ending_date: optional stringUTC 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 afterstarting_date.format: date
-
filter: optional array of stringFilters 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_namematches case-insensitively;productisclaude_codeorcowork(the only surfaces with plugin attribution);rbac_group_idtakes 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_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "product" or "rbac_group_id" or "user_id"Dimensions to break results out by (e.g.
group_by[]=user_id). Supported on this endpoint:product,rbac_group_id,user_id. On this endpointproducttakes the valuesclaude_codeorcoworkonly (the surfaces with plugin attribution). Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses vianext_page; an unsupported dimension returns 400.rbac_group_idattributes 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.maxItems: 100
-
"product" -
"rbac_group_id" -
"user_id"
-
-
limit: optional numberNumber of results per page (1-1000, default 100).
minimum: 1, maximum: 1000
-
order: optional "asc" or "desc"Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.-
"asc" -
"desc"
-
-
order_by: optional stringSort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. -
starting_date: optional stringUTC 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
dateorstarting_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.format: date
Returns
-
BetaPluginUsage objectResponse for GET /v1/organizations/analytics/plugins.
-
data: array of object-
claude_code_metrics: objectClaude Code activity metrics for a single plugin on a given day.
-
distinct_session_plugin_used_count: number or nullNumber of distinct Claude Code sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.
-
-
cowork_metrics: objectCowork activity metrics for a single plugin on a given day.
-
distinct_session_plugin_used_count: number or nullNumber of distinct Cowork sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.
-
-
distinct_user_count: numberNumber 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.
-
install_count: number or nullNumber 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.
-
invocation_count: numberNumber of plugin invocations on the requested day
-
plugin_name: stringName of the plugin
-
plugin_id: optional string or nullStable 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. -
product: optional string or nullProduct that produced this row's activity: one of
chat,claude_code,cowork, oroffice_agent(the canonical Cost & Usage product naming; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics). On/pluginsonlycoworkandclaude_codeoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code, andcoworkoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct. -
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
user_id: optional string or nullTagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
-
next_page: string or nullOpaque cursor for the next page, or null if no more results
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/plugins \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"claude_code_metrics": {
"distinct_session_plugin_used_count": 0
},
"cowork_metrics": {
"distinct_session_plugin_used_count": 0
},
"distinct_user_count": 0,
"install_count": 0,
"invocation_count": 0,
"plugin_name": "plugin_name",
"plugin_id": "plugin_id",
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Analytics › Artifacts
Get Artifact Activity
GET /v1/organizations/analytics/artifacts
Get artifact-creation activity for a given day, broken out by MIME type.
Returns the full (artifact_type, is_shared) cube for the organization;
next_page is null except for grouped queries, which paginate. The cube
can be broken out per product, per member, or per RBAC group via
group_by[], and scoped via filter[]. Requires an API key with the
read:analytics scope.
Query parameters
-
date: stringUTC 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.
format: date
-
filter: optional array of stringFilters 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,product,rbac_group_id,user_id. Value forms:artifact_typeis a canonical artifact MIME type (e.g.text/markdown) orother;is_sharedistrueorfalse;productischat,claude_code, orcowork(the surfaces that create artifacts);rbac_group_idtakes 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_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries.maxItems: 100
-
group_by: optional array of "product" or "rbac_group_id" or "user_id"Dimensions to break results out by:
product,user_idand/orrbac_group_id. The ungrouped artifact-type cube is finite and returned in full; grouped queries multiply the cube and paginate vianext_page.producttakes the valueschat,claude_code, orcowork(the surfaces that create artifacts).rbac_group_idattributes 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.maxItems: 100
-
"product" -
"rbac_group_id" -
"user_id"
-
-
limit: optional numberMaximum rows to return (1-1000, default 100). The ungrouped artifact-type cube is finite and returned in full;
limitis the page size only whengroup_by[]multiplies the cube.minimum: 1, maximum: 1000
-
page: optional stringOpaque cursor from a previous response's
next_pagefield. Only valid withgroup_by[]— the ungrouped cube is never paginated.
Returns
-
BetaArtifactUsage objectResponse for GET /v1/organizations/analytics/artifacts.
next_pageis null on ungrouped queries — the artifact-type cube is finite and returned in full. Grouped queries (group_by[]onproduct/user_id/rbac_group_id) multiply the cube and paginate like the other analytics list endpoints.-
data: array of object-
artifact_type: stringCanonical artifact MIME type (e.g.
text/markdown,application/vnd.ant.react,image/svg+xml), orother. Claude Code and Cowork artifacts report astext/html. -
artifacts_created_count: numberNumber of artifacts created in this bucket on the requested day
-
distinct_user_count: numberNumber of distinct users who created artifacts in this bucket on the requested day
-
is_shared: booleanWhether the artifacts in this bucket have ever been shared (a Claude Code / Cowork artifact is shared once anyone beyond its creator may open it: named members, the whole organization, or anyone with the link).
-
published_artifacts_created_count: numberNumber of those artifacts that have been published (for Claude Code / Cowork artifacts: open to anyone with the link); never exceeds
artifacts_created_count -
product: optional string or nullProduct that produced this row's activity: one of
chat,claude_code,cowork, oroffice_agent(the canonical Cost & Usage product naming; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics). On/pluginsonlycoworkandclaude_codeoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code, andcoworkoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct. -
rbac_group_id: optional string or nullTagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id. -
rbac_group_name: optional string or nullResolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key. -
user_id: optional string or nullTagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
-
next_page: string or nullCursor for the next page of a grouped query; always null for the ungrouped artifact-type cube, which is returned in full.
-
Example
curl https://api.anthropic.com/v1/organizations/analytics/artifacts \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response (200)
{
"data": [
{
"artifact_type": "artifact_type",
"artifacts_created_count": 0,
"distinct_user_count": 0,
"is_shared": true,
"published_artifacts_created_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}