Claude Platform Docs

Analytique

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.

One of the following:
"product"
"rbac_group_id"
"user_id"
class AnalyticsChatCoworkUnifiedChatMetrics { $connectorsUsedCount; $distinctArtifactsCreatedCount; $distinctConnectorsUsedCount; /* 9 more */ }
class AnalyticsChatCoworkUnifiedMetrics { $chat; $sessions; }

Chat activity recorded while members had Chat and Cowork unified turned on.

Cowork session activity recorded while members had Chat and Cowork unified turned on.

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.

class AnalyticsConnectorActivity { $chatMetrics; $claudeCodeMetrics; $connectorDisplayName; /* 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 AnalyticsConnectorChatCoworkUnifiedMetrics { $chat; $sessions; }

A connector's use in chat conversations recorded while members had Chat and Cowork unified turned on.

A connector's use in Cowork sessions recorded while members had Chat and Cowork unified turned on.

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.

One of the following:
"product"
"rbac_group_id"
"user_id"
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.

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

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

One of the following:
"asc"
"desc"
class AnalyticsPluginActivity { $claudeCodeMetrics; $coworkMetrics; $distinctUserCount; /* 9 more */ }
class AnalyticsPluginChatCoworkUnifiedMetrics { $distinctSessionPluginUsedCount; }
?int distinctSessionPluginUsedCount

Same measure as cowork_metrics.distinct_session_plugin_used_count, for activity recorded while members had Chat and Cowork unified turned on. Null on aggregated rows where a distinct count cannot be computed.

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:
"product"
"rbac_group_id"
"user_id"
class AnalyticsProjectActivity { $createdAt; $createdBy; $distinctConversationCount; /* 7 more */ }
?\Datetime createdAt

Project creation timestamp in RFC 3339 format. Null if the project was deleted before attribution was recorded.

?AnalyticsUser createdBy

User who created the project. Null if the project was deleted before attribution was recorded, or if the creator's account no longer exists.

?int distinctConversationCount

Number of distinct conversations in the project. Null on aggregated rows where a distinct count cannot be computed.

int distinctUserCount

Number of distinct users who used the project on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.

int messageCount

Number of messages sent in the project on the requested day

string projectID

Tagged project identifier (e.g. claude_proj_...)

string projectName

Name of the project

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

One of the following:
"rbac_group_id"
"user_id"
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 AnalyticsSingleDayActivitySummary { $assignedSeatCount; $coworkDailyActiveUserCount; $coworkMonthlyActiveUserCount; /* 29 more */ }
class AnalyticsSkillActivity { $attributedListPrice; $chatMetrics; $claudeCodeMetrics; /* 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 AnalyticsSkillChatCoworkUnifiedMetrics { $chat; $sessions; }

A skill's use in chat conversations recorded while members had Chat and Cowork unified turned on.

A skill's use in Cowork sessions recorded while members had Chat and Cowork unified turned on.

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.

One of the following:
"product"
"rbac_group_id"
"user_id"
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.

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 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 */ }

AnalytiqueRésumés

Obtenir les résumés d'activité
$client->organization->analytics->summaries->list(\Datetime startingDate, ?\Datetime endingDate, ?list<string> filter, ?int limit, ?string page): PageCursor<AnalyticsSingleDayActivitySummary>
GET/v1/organizations/analytics/summaries

Obtient les résumés d'activité à l'échelle de l'organisation pour une plage de dates.

AnalytiqueUtilisateurs

Lister l'activité des utilisateurs
$client->organization->analytics->users->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<AnalyticsUserGroupBy> groupBy, ?int limit, ?AnalyticsOrder order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsUserActivity>
GET/v1/organizations/analytics/users

Obtenir l'activité par utilisateur pour un jour donné, avec pagination par curseur.

AnalytiqueApplicationsChatProjets

Obtenir l'utilisation des projets de chat
$client->organization->analytics->apps->chat->projects->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<AnalyticsProjectGroupBy> groupBy, ?int limit, ?AnalyticsOrder order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsProjectActivity>
GET/v1/organizations/analytics/apps/chat/projects

Obtient l'activité par projet pour un jour donné, avec une pagination par curseur.

AnalytiqueConnecteurs

Obtenir l'utilisation des connecteurs
$client->organization->analytics->connectors->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<AnalyticsConnectorGroupBy> groupBy, ?int limit, ?AnalyticsOrder order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsConnectorActivity>
GET/v1/organizations/analytics/connectors

Obtenir l'utilisation par connecteur pour un jour donné, avec pagination par curseur.

AnalytiquePlugins

Obtenir l'utilisation des plugins
$client->organization->analytics->plugins->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<AnalyticsPluginGroupBy> groupBy, ?int limit, ?AnalyticsOrder order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsPluginActivity>
GET/v1/organizations/analytics/plugins

Obtenir l'utilisation par plugin (installations + invocations) pour un jour donné, avec pagination.

AnalytiqueCompétences

Obtenir l'utilisation des skills
$client->organization->analytics->skills->list(?\Datetime date, ?\Datetime endingDate, ?list<string> filter, ?list<AnalyticsSkillGroupBy> groupBy, ?int limit, ?AnalyticsOrder order, ?string orderBy, ?string page, ?\Datetime startingDate): PageCursor<AnalyticsSkillActivity>
GET/v1/organizations/analytics/skills

Obtenir l'utilisation par skill pour un jour donné, avec pagination par curseur.

AnalytiqueArtifacts

Obtenir l'activité des artifacts
$client->organization->analytics->artifacts->list(\Datetime date, ?list<string> filter, ?list<AnalyticsArtifactGroupBy> groupBy, ?int limit, ?string page): PageCursor<AnalyticsArtifactActivity>
GET/v1/organizations/analytics/artifacts

Obtenir l'activité de création d'artifacts pour un jour donné, ventilée par type MIME.