Claude Platform Docs

Analytics

Models
class AnalyticsArtifactActivity { $artifactType; $artifactsCreatedCount; $distinctUserCount; /* 6 more */ }
string artifactType

Canonical artifact MIME type (e.g. text/markdown, application/vnd.ant.react, image/svg+xml), or other. Claude Code and Cowork artifacts report as text/html.

int artifactsCreatedCount

Number of artifacts created in this bucket on the requested day

int distinctUserCount

Number of distinct users who created artifacts in this bucket on the requested day

bool isShared

Whether 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).

int publishedArtifactsCreatedCount

Number of those artifacts that have been published (for Claude Code / Cowork artifacts: open to anyone with the link); never exceeds artifacts_created_count

?string product

Product that produced this row's activity: one of chat, claude_code, cowork, office_agent, or chat_cowork_unified (Chat and Cowork unified). These are the canonical Cost & Usage product names; an office_agent row's per-surface breakdown is in its office_metrics. On /plugins only cowork, claude_code and chat_cowork_unified occur (the only surfaces with plugin attribution); on /artifacts only chat, claude_code, cowork and chat_cowork_unified occur (the surfaces that create artifacts); /apps/chat/projects does not support the product dimension (a product entry in group_by[] or filter[] there is rejected). Present only when the request grouped by product.

?string rbacGroupID

Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped by rbac_group_id.

?string rbacGroupName

Resolved RBAC group display name, alongside rbac_group_id when name resolution is available. Null if the group has been deleted or its name could not be resolved; rbac_group_id remains the stable key.

?string userID

Tagged user identifier (e.g. user_...). Present only when the request grouped by user_id.

class AnalyticsChatCoworkUnifiedChatMetrics { $connectorsUsedCount; $distinctArtifactsCreatedCount; $distinctConnectorsUsedCount; /* 9 more */ }
class AnalyticsChatCoworkUnifiedSessionsMetrics { $actionCount; $artifactsCreatedCount; $connectorsUsedCount; /* 14 more */ }
class AnalyticsChatMetrics { $connectorsUsedCount; $distinctArtifactsCreatedCount; $distinctConnectorsUsedCount; /* 9 more */ }
class AnalyticsClaudeCodeMetrics { $coreMetrics; $toolActions; }

Core Claude Code activity metrics for a single user on a given day.

AnalyticsToolActions toolActions

Per-tool accepted/rejected counts for Claude Code file modification tools.

One of the following:
"dm"
"engaged"
"monitoring"
"proactive"
"scheduled"
class AnalyticsConnectorActivity { $chatMetrics; $claudeCodeMetrics; $connectorName; /* 14 more */ }
class AnalyticsConnectorChatCoworkUnifiedChatMetrics { $distinctConversationConnectorUsedCount; }
?int distinctConversationConnectorUsedCount

Same measure as chat_metrics.distinct_conversation_connector_used_count, for activity recorded while members had Chat and Cowork unified turned on. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsConnectorChatCoworkUnifiedSessionsMetrics { $distinctSessionConnectorUsedCount; }
?int distinctSessionConnectorUsedCount

Same measure as cowork_metrics.distinct_session_connector_used_count, for activity recorded while members had Chat and Cowork unified turned on. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsConnectorChatMetrics { $distinctConversationConnectorUsedCount; }
?int distinctConversationConnectorUsedCount

Number of distinct conversations in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsConnectorClaudeCodeMetrics { $distinctSessionConnectorUsedCount; }
?int distinctSessionConnectorUsedCount

Number of distinct Claude Code sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsConnectorCoworkMetrics { $distinctSessionConnectorUsedCount; }
?int distinctSessionConnectorUsedCount

Number of distinct Cowork sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsConnectorOfficeMetrics { $excel; $outlook; $powerpoint; $word; }

Office Agent activity metrics for a single connector on a given day within one Office product.

Office Agent activity metrics for a single connector on a given day within one Office product.

Office Agent activity metrics for a single connector on a given day within one Office product.

Office Agent activity metrics for a single connector on a given day within one Office product.

class AnalyticsConnectorOfficeProductMetrics { $distinctSessionConnectorUsedCount; }
?int distinctSessionConnectorUsedCount

Number of distinct Office Agent sessions in which the connector was used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

One of the following:
"0-200k"
"200k-1M"
class AnalyticsCoreCodeMetrics { $artifactsCreatedCount; $commitCount; $distinctSessionCount; /* 2 more */ }
int artifactsCreatedCount

Number 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.

int commitCount

Number of commits made via Claude Code

?int distinctSessionCount

Number of distinct Claude Code sessions. On aggregated rows and in date-range mode: summed per-day distinct counts. A session essentially never spans a UTC day, so the sum is in practice the true distinct count.

AnalyticsLinesOfCode linesOfCode

Lines of code added and removed via Claude Code.

int pullRequestCount

Number of pull requests created via Claude Code

class AnalyticsCostBucketedResult { $amount; $claudeTagCategory; $claudeTagUserID; /* 12 more */ }
class AnalyticsCostReportTimeBucket { $endingAt; $results; $startingAt; }
\Datetime endingAt

End of the time bucket (exclusive) in RFC 3339 format.

Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when group_by[] is omitted, or one row per group (subject to the per-bucket group cap described on the group_by[] parameter).

\Datetime startingAt

Start of the time bucket (inclusive) in RFC 3339 format.

One of the following:
"code_execution"
"tokens"
"web_search"
class AnalyticsCostUsersItem { $actor; $amount; $claudeTagCategory; /* 15 more */ }
class AnalyticsCoworkMetrics { $actionCount; $artifactsCreatedCount; $connectorsUsedCount; /* 14 more */ }
class AnalyticsDesignMetrics { $distinctProjectsCreatedCount; $distinctProjectsUsedCount; $distinctSessionCount; $messageCount; }
int distinctProjectsCreatedCount

Number of distinct Claude Design projects created. Exact in date-range mode: a creation belongs to exactly one day, so the per-day counts never overlap and their sum over the window is the exact count of distinct creations in it.

?int distinctProjectsUsedCount

Number of distinct Claude Design projects the user worked in. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

?int distinctSessionCount

Number of distinct Claude Design sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

int messageCount

Number of messages sent in Claude Design sessions

One of the following:
"global"
"not_available"
"us"
class AnalyticsLinesOfCode { $addedCount; $removedCount; }
int addedCount

Lines of code added

int removedCount

Lines of code removed

class AnalyticsOfficeMetrics { $excel; $outlook; $powerpoint; $word; }

Office Agent activity metrics for a single user on a given day within one Office product.

Office Agent activity metrics for a single user on a given day within one Office product.

Office Agent activity metrics for a single user on a given day within one Office product.

Office Agent activity metrics for a single user on a given day within one Office product.

class AnalyticsOfficeProductMetrics { $connectorsUsedCount; $distinctConnectorsUsedCount; $distinctSessionCount; /* 3 more */ }
int connectorsUsedCount

Number of MCP connector invocations

?int distinctConnectorsUsedCount

Number of distinct MCP connectors used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

?int distinctSessionCount

Number of distinct Office Agent sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

?int distinctSkillsUsedCount

Number of distinct skills used. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

int messageCount

Number of messages sent

int skillsUsedCount

Number of skill invocations

class AnalyticsPluginActivity { $claudeCodeMetrics; $coworkMetrics; $distinctUserCount; /* 9 more */ }
class AnalyticsPluginClaudeCodeMetrics { $distinctSessionPluginUsedCount; }
?int distinctSessionPluginUsedCount

Number of distinct Claude Code sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsPluginCoworkMetrics { $distinctSessionPluginUsedCount; }
?int distinctSessionPluginUsedCount

Number of distinct Cowork sessions in which the plugin was invoked. Null on aggregated rows where a distinct count cannot be computed.

One of the following:
"chat"
"chat_cowork_unified"
"claude-tag"
"claude_code"
"claude_design"
"claude_in_chrome"
"cowork"
"office_agent"
class AnalyticsProjectActivity { $distinctUserCount; $messageCount; $projectID; /* 8 more */ }
class AnalyticsScienceMetrics { $delegationCount; $distinctSessionCount; $messageCount; /* 2 more */ }
int delegationCount

Number of delegations (handoffs to a specialized agent) in Claude Science sessions

?int distinctSessionCount

Number of distinct Claude Science sessions. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

int messageCount

Number of messages sent in Claude Science sessions

int remoteComputeJobCount

Number of remote compute jobs launched from Claude Science sessions

int skillsUsedCount

Total number of skill invocations in Claude Science sessions

class AnalyticsServerToolUse { $webSearchRequests; }
int webSearchRequests

The number of web search requests made.

class AnalyticsSingleDayActivitySummary { $assignedSeatCount; $coworkDailyActiveUserCount; $coworkMonthlyActiveUserCount; /* 29 more */ }
class AnalyticsSkillActivity { $chatMetrics; $claudeCodeMetrics; $coworkMetrics; /* 15 more */ }
class AnalyticsSkillChatCoworkUnifiedChatMetrics { $distinctConversationSkillUsedCount; }
?int distinctConversationSkillUsedCount

Same measure as chat_metrics.distinct_conversation_skill_used_count, for activity recorded while members had Chat and Cowork unified turned on. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsSkillChatCoworkUnifiedSessionsMetrics { $distinctSessionSkillUsedCount; }
?int distinctSessionSkillUsedCount

Same measure as cowork_metrics.distinct_session_skill_used_count, for activity recorded while members had Chat and Cowork unified turned on. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsSkillChatMetrics { $distinctConversationSkillUsedCount; }
?int distinctConversationSkillUsedCount

Number of distinct conversations in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsSkillClaudeCodeMetrics { $distinctSessionSkillUsedCount; }
?int distinctSessionSkillUsedCount

Number of distinct Claude Code sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsSkillCoworkMetrics { $distinctSessionSkillUsedCount; }
?int distinctSessionSkillUsedCount

Number of distinct Cowork sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

class AnalyticsSkillOfficeMetrics { $excel; $outlook; $powerpoint; $word; }

Office Agent activity metrics for a single skill on a given day within one Office product.

Office Agent activity metrics for a single skill on a given day within one Office product.

Office Agent activity metrics for a single skill on a given day within one Office product.

Office Agent activity metrics for a single skill on a given day within one Office product.

class AnalyticsSkillOfficeProductMetrics { $distinctSessionSkillUsedCount; }
?int distinctSessionSkillUsedCount

Number of distinct Office Agent sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.

One of the following:
"cache_creation.ephemeral_1h_input_tokens"
"cache_creation.ephemeral_5m_input_tokens"
"cache_read_input_tokens"
"output_tokens"
"uncached_input_tokens"
class AnalyticsToolActionCounts { $acceptedCount; $rejectedCount; }
int acceptedCount

Number of tool proposals accepted

int rejectedCount

Number of tool proposals rejected

class AnalyticsToolActions { $editTool; $multiEditTool; $notebookEditTool; $writeTool; }

Accepted/rejected counts for a single Claude Code tool type.

AnalyticsToolActionCounts multiEditTool

Accepted/rejected counts for a single Claude Code tool type.

AnalyticsToolActionCounts notebookEditTool

Accepted/rejected counts for a single Claude Code tool type.

Accepted/rejected counts for a single Claude Code tool type.

class AnalyticsUsageBucketedResult { $cacheCreation; $cacheReadInputTokens; $claudeTagCategory; /* 12 more */ }
class AnalyticsUsageReportTimeBucket { $endingAt; $results; $startingAt; }
\Datetime endingAt

End of the time bucket (exclusive) in RFC 3339 format.

Rows for this time bucket. Empty when the bucket has no data; otherwise a single combined row when group_by[] is omitted, or one row per group (subject to the per-bucket group cap described on the group_by[] parameter).

\Datetime startingAt

Start of the time bucket (inclusive) in RFC 3339 format.

class AnalyticsUsageUsersItem { $actor; $cacheCreation; $cacheReadInputTokens; /* 16 more */ }
class AnalyticsUser { $type = 'user'; $id; $emailAddress; }
"user" type

Object type. Always user.

string id

Tagged user identifier (e.g. user_...)

string emailAddress

Email address of the user

class AnalyticsUserActivity { $chatMetrics; $claudeCodeMetrics; $coworkMetrics; /* 10 more */ }
class AnalyticsUserActor { $type = 'user_actor'; $deleted; $emailAddress; /* 2 more */ }
"user_actor" type

Actor type. Always "user_actor".

bool deleted

True 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). email_address stays populated for removed users and is null when the account has been deleted. name follows the rules described on that field. The user_id is still populated for reconciliation.

?string emailAddress

The user's email address, including for users who are no longer members of the organization or its associated organizations. Null when the account has been deleted (check deleted) and for system-minted service accounts, which have no person's mailbox behind them (check name).

?string name

The 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.

string userID

Tagged user ID.

AnalyticsSummaries

Get Activity Summaries
$client->beta->organization->analytics->summaries->list(\Datetime startingDate, ?\Datetime endingDate, ?list<string> filter, ?int limit, ?string page): PageCursor<AnalyticsSingleDayActivitySummary>
GET/v1/organizations/analytics/summaries

Get organization-wide activity summaries for a date range.

AnalyticsUsers

List User Activity
$client->beta->organization->analytics->users->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?Order order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsUserActivity>
GET/v1/organizations/analytics/users

Get per-user activity for a given day, with cursor-based pagination.

AnalyticsAppsChatProjects

Get Chat Project Usage
$client->beta->organization->analytics->apps->chat->projects->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?Order order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsProjectActivity>
GET/v1/organizations/analytics/apps/chat/projects

Get per-project activity for a given day, with cursor-based pagination.

AnalyticsConnectors

Get Connector Usage
$client->beta->organization->analytics->connectors->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?Order order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsConnectorActivity>
GET/v1/organizations/analytics/connectors

Get per-connector usage for a given day, with cursor-based pagination.

AnalyticsPlugins

Get Plugin Usage
$client->beta->organization->analytics->plugins->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?Order order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsPluginActivity>
GET/v1/organizations/analytics/plugins

Get per-plugin install + invocation usage for a given day, with pagination.

AnalyticsSkills

Get Skill Usage
$client->beta->organization->analytics->skills->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?Order order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsSkillActivity>
GET/v1/organizations/analytics/skills

Get per-skill usage for a given day, with cursor-based pagination.

AnalyticsArtifacts

Get Artifact Activity
$client->beta->organization->analytics->artifacts->list(\Datetime date, ?list<string> filter, ?list<GroupBy> groupBy, ?int limit, ?string page): PageCursor<AnalyticsArtifactActivity>
GET/v1/organizations/analytics/artifacts

Get artifact-creation activity for a given day, broken out by MIME type.

AnalyticsUsage Report

Get Token Usage Over Time
$client->beta->organization->analytics->usageReport->list(\Datetime startingAt, ?BucketWidth bucketWidth, ?list<AnalyticsClaudeTagCategory> claudeTagCategories, ?list<string> claudeTagUserIDs, ?list<AnalyticsContextWindow> contextWindows, ?\Datetime endingAt, ?list<GroupBy> groupBy, ?list<AnalyticsInferenceGeoFilter> inferenceGeos, ?int limit, ?list<string> models, ?string page, ?list<AnalyticsProductFilter> products, ?list<string> rbacGroupIDs, ?list<string> slackChannelIDs, ?list<Speed> speeds, ?list<string> userIDs): ReportPageCursor<AnalyticsUsageReportTimeBucket>
GET/v1/organizations/analytics/usage_report

Get token usage over time across a date range.

AnalyticsUser Usage Report

Get Per-User Token Usage
$client->beta->organization->analytics->userUsageReport->list(\Datetime startingAt, ?BucketWidth bucketWidth, ?list<AnalyticsClaudeTagCategory> claudeTagCategories, ?list<string> claudeTagUserIDs, ?list<AnalyticsContextWindow> contextWindows, ?\Datetime endingAt, ?bool excludeDeletedUsers, ?list<GroupBy> groupBy, ?list<AnalyticsInferenceGeoFilter> inferenceGeos, ?int limit, ?list<string> models, ?Order order, ?OrderBy orderBy, ?string page, ?list<AnalyticsProductFilter> products, ?list<string> rbacGroupIDs, ?list<string> slackChannelIDs, ?list<Speed> speeds, ?list<string> userIDs): ReportPageCursor<AnalyticsUsageUsersItem>
GET/v1/organizations/analytics/user_usage_report

Get per-user token usage across a date range.

AnalyticsCost Report

Get Cost Over Time
$client->beta->organization->analytics->costReport->list(\Datetime startingAt, ?BucketWidth bucketWidth, ?list<AnalyticsClaudeTagCategory> claudeTagCategories, ?list<string> claudeTagUserIDs, ?list<AnalyticsContextWindow> contextWindows, ?\Datetime endingAt, ?list<GroupBy> groupBy, ?list<AnalyticsInferenceGeoFilter> inferenceGeos, ?int limit, ?list<string> models, ?string page, ?list<AnalyticsProductFilter> products, ?list<string> rbacGroupIDs, ?list<string> slackChannelIDs, ?list<Speed> speeds, ?list<string> userIDs): ReportPageCursor<AnalyticsCostReportTimeBucket>
GET/v1/organizations/analytics/cost_report

Get cost in USD over time across a date range.

AnalyticsUser Cost Report

Get Per-User Cost
$client->beta->organization->analytics->userCostReport->list(\Datetime startingAt, ?BucketWidth bucketWidth, ?list<AnalyticsClaudeTagCategory> claudeTagCategories, ?list<string> claudeTagUserIDs, ?list<AnalyticsContextWindow> contextWindows, ?\Datetime endingAt, ?bool excludeDeletedUsers, ?list<GroupBy> groupBy, ?list<AnalyticsInferenceGeoFilter> inferenceGeos, ?int limit, ?list<string> models, ?Order order, ?OrderBy orderBy, ?string page, ?list<AnalyticsProductFilter> products, ?list<string> rbacGroupIDs, ?list<string> slackChannelIDs, ?list<Speed> speeds, ?list<string> userIDs): ReportPageCursor<AnalyticsCostUsersItem>
GET/v1/organizations/analytics/user_cost_report

Get per-user cost in USD across a date range.