Claude Platform Docs

アナリティクス

Models
type BetaAnalyticsActorUnion interface{…}
One of the following:
type BetaAnalyticsActorType string

Kind of identity a row's usage is attributed to.

One of the following:
const BetaAnalyticsActorTypeAPIActor BetaAnalyticsActorType = "api_actor"
const BetaAnalyticsActorTypeFederatedActor BetaAnalyticsActorType = "federated_actor"
const BetaAnalyticsActorTypeServiceAccountActor BetaAnalyticsActorType = "service_account_actor"
const BetaAnalyticsActorTypeUserActor BetaAnalyticsActorType = "user_actor"
type BetaAnalyticsAPIActor struct { Type: "api_actor"; APIKeyID }
Type APIActor
APIKeyID string

Tagged API key ID.

type BetaAnalyticsArtifactActivity struct { ArtifactType; ArtifactsCreatedCount; DistinctUserCount; /* 6 more */ }

Artifact-creation activity for one (artifact_type, is_shared) bucket on a given day.

Artifacts form a small finite cube — the canonical MIME type (8 values incl. other) crossed with shared-vs-private — so the response is the full set of non-empty buckets, not a ranked/paginated list. Claude Code and Cowork artifacts report under text/html and are counted from 2026-08-17 onward; earlier days contain claude.ai chat artifacts only. With group_by[]=product / user_id / rbac_group_id each row is further split by the flat group keys and counts are scoped to that cut.

type BetaAnalyticsArtifactGroupBy string

A dimension to group artifact activity by.

One of the following:
const BetaAnalyticsArtifactGroupByProduct BetaAnalyticsArtifactGroupBy = "product"
const BetaAnalyticsArtifactGroupByRBACGroupID BetaAnalyticsArtifactGroupBy = "rbac_group_id"
const BetaAnalyticsArtifactGroupByUserID BetaAnalyticsArtifactGroupBy = "user_id"
type BetaAnalyticsChatCoworkUnifiedChatMetrics struct { ConnectorsUsedCount; DistinctArtifactsCreatedCount; DistinctConnectorsUsedCount; /* 9 more */ }

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

type BetaAnalyticsChatCoworkUnifiedMetrics struct { Chat; Sessions }

Activity in Chat and Cowork unified for one user on one day: chat holds chat activity and sessions holds Cowork session activity.

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.

type BetaAnalyticsChatCoworkUnifiedSessionsMetrics struct { ActionCount; ArtifactsCreatedCount; ConnectorsUsedCount; /* 14 more */ }

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

type BetaAnalyticsChatMetrics struct { ConnectorsUsedCount; DistinctArtifactsCreatedCount; DistinctConnectorsUsedCount; /* 9 more */ }

Claude.ai activity metrics for a single user on a given day.

type BetaAnalyticsClaudeCodeMetrics struct { CoreMetrics; ToolActions }

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

type BetaAnalyticsClaudeTagCategory string
One of the following:
const BetaAnalyticsClaudeTagCategoryDm BetaAnalyticsClaudeTagCategory = "dm"
const BetaAnalyticsClaudeTagCategoryEngaged BetaAnalyticsClaudeTagCategory = "engaged"
const BetaAnalyticsClaudeTagCategoryMonitoring BetaAnalyticsClaudeTagCategory = "monitoring"
const BetaAnalyticsClaudeTagCategoryProactive BetaAnalyticsClaudeTagCategory = "proactive"
const BetaAnalyticsClaudeTagCategoryScheduled BetaAnalyticsClaudeTagCategory = "scheduled"
type BetaAnalyticsClaudeTagMetrics struct { ActiveDayCount; ActiveMessageCount }

Claude Tag activity metrics for a single linked user on a given day.

ActiveDayCount int64

1 on a day the user was active in Claude Tag in Slack, otherwise 0. Summed over the window in date-range mode, so it is the number of active days; on grouped rows, the total of each member's active days. Null when Claude Tag data cannot be read for the request. Otherwise, 0 on a row filtered by project, and null on any other row when no covered day was measured.

ActiveMessageCount int64

Number of the user's Slack messages that made them active: @-mentions, direct messages, group direct message asks, and thread posts Claude answered. Other messages are not counted. Null when Claude Tag data cannot be read for the request. Otherwise, 0 on a row filtered by project, and null on any other row when no covered day was measured.

type BetaAnalyticsConnectorActivity struct { ChatMetrics; ClaudeCodeMetrics; ConnectorDisplayName; /* 14 more */ }

Per-connector activity data for a given day.

type BetaAnalyticsConnectorChatCoworkUnifiedChatMetrics struct { DistinctConversationConnectorUsedCount }

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

DistinctConversationConnectorUsedCount int64

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.

type BetaAnalyticsConnectorChatCoworkUnifiedMetrics struct { Chat; Sessions }

A connector's use in Chat and Cowork unified on one day: chat holds its use in chat conversations and sessions its use in Cowork sessions.

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

DistinctConversationConnectorUsedCount int64

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.

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

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsConnectorChatCoworkUnifiedSessionsMetrics struct { DistinctSessionConnectorUsedCount }

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

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsConnectorChatMetrics struct { DistinctConversationConnectorUsedCount }

Claude.ai activity metrics for a single connector on a given day.

DistinctConversationConnectorUsedCount int64

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.

type BetaAnalyticsConnectorClaudeCodeMetrics struct { DistinctSessionConnectorUsedCount }

Claude Code activity metrics for a single connector on a given day.

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsConnectorCoworkMetrics struct { DistinctSessionConnectorUsedCount }

Cowork activity metrics for a single connector on a given day.

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsConnectorGroupBy string

A dimension to group connector activity by.

One of the following:
const BetaAnalyticsConnectorGroupByProduct BetaAnalyticsConnectorGroupBy = "product"
const BetaAnalyticsConnectorGroupByRBACGroupID BetaAnalyticsConnectorGroupBy = "rbac_group_id"
const BetaAnalyticsConnectorGroupByUserID BetaAnalyticsConnectorGroupBy = "user_id"
type BetaAnalyticsConnectorOfficeMetrics struct { Excel; Outlook; Powerpoint; Word }

Office Agent activity metrics for a single connector on a given day, broken out by Office product.

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

DistinctSessionConnectorUsedCount int64

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.

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

DistinctSessionConnectorUsedCount int64

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.

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

DistinctSessionConnectorUsedCount int64

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.

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

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsConnectorOfficeProductMetrics struct { DistinctSessionConnectorUsedCount }

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

DistinctSessionConnectorUsedCount int64

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.

type BetaAnalyticsContextWindow string
One of the following:
const BetaAnalyticsContextWindowFrom0To200k BetaAnalyticsContextWindow = "0-200k"
const BetaAnalyticsContextWindowFrom200kTo1M BetaAnalyticsContextWindow = "200k-1M"
type BetaAnalyticsCoreCodeMetrics struct { ArtifactsCreatedCount; CommitCount; DistinctSessionCount; /* 2 more */ }

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

ArtifactsCreatedCount int64

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.

CommitCount int64

Number of commits made via Claude Code

DistinctSessionCount int64

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.

Lines of code added and removed via Claude Code.

AddedCount int64

Lines of code added

RemovedCount int64

Lines of code removed

PullRequestCount int64

Number of pull requests created via Claude Code

type BetaAnalyticsCostBucketedResult struct { Amount; ClaudeTagCategory; ClaudeTagUserID; /* 12 more */ }
type BetaAnalyticsCostReportTimeBucket struct { EndingAt; Results; StartingAt }
type BetaAnalyticsCostType string
One of the following:
const BetaAnalyticsCostTypeCodeExecution BetaAnalyticsCostType = "code_execution"
const BetaAnalyticsCostTypeTokens BetaAnalyticsCostType = "tokens"
type BetaAnalyticsCostUsersItem struct { Actor; Amount; ClaudeTagCategory; /* 15 more */ }
type BetaAnalyticsCoworkMetrics struct { ActionCount; ArtifactsCreatedCount; ConnectorsUsedCount; /* 14 more */ }

Cowork activity metrics for a single user on a given day.

type BetaAnalyticsDesignMetrics struct { DistinctProjectsCreatedCount; DistinctProjectsUsedCount; DistinctSessionCount; MessageCount }

Claude Design activity metrics for a single user on a given day.

DistinctProjectsCreatedCount int64

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.

DistinctProjectsUsedCount int64

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.

DistinctSessionCount int64

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.

MessageCount int64

Number of messages sent in Claude Design sessions

type BetaAnalyticsFederatedActor struct { Type: "federated_actor"; Provider; Subject }
Type FederatedActor

The trusted provider that asserted the caller's identity.

One of the following:
Subject string

The provider's identifier for the caller: on aws, the IAM principal ARN (one role is one actor across its sessions); on gcp, the caller's IAM principal identifier as Google Cloud reports it, such as serviceAccount:<email>, user:<email>, or a principal://... URI.

type BetaAnalyticsFederatedActorAWSProvider struct { Type: "aws"; AccountID; SignedPrincipal }
Type AWS
AccountID string

The AWS account the organization is bound to.

SignedPrincipal string

The AWS-signed ARN of the IAM principal that made the requests.

type BetaAnalyticsFederatedActorAzureProvider struct { Type: "azure"; SubscriptionID }
Type Azure
SubscriptionID string

The Azure subscription the organization is bound to.

type BetaAnalyticsFederatedActorGCPProvider struct { Type: "gcp"; ProjectNumber }
Type GCP
ProjectNumber string

The Google Cloud project the organization is bound to.

type BetaAnalyticsFederatedActorOIDCProvider struct { Type: "oidc"; Issuer }
Type OIDC
Issuer string

The federation issuer's URL.

type BetaAnalyticsFederatedActorProviderUnion interface{…}
One of the following:
type BetaAnalyticsGroupedCostType string
One of the following:
const BetaAnalyticsGroupedCostTypeCodeExecution BetaAnalyticsGroupedCostType = "code_execution"
const BetaAnalyticsGroupedCostTypeSessionUsage BetaAnalyticsGroupedCostType = "session_usage"
const BetaAnalyticsGroupedCostTypeTokens BetaAnalyticsGroupedCostType = "tokens"
type BetaAnalyticsInferenceGeoFilter string
One of the following:
const BetaAnalyticsInferenceGeoFilterGlobal BetaAnalyticsInferenceGeoFilter = "global"
const BetaAnalyticsInferenceGeoFilterNotAvailable BetaAnalyticsInferenceGeoFilter = "not_available"
const BetaAnalyticsInferenceGeoFilterUs BetaAnalyticsInferenceGeoFilter = "us"
type BetaAnalyticsLinesOfCode struct { AddedCount; RemovedCount }

Lines of code added and removed via Claude Code.

AddedCount int64

Lines of code added

RemovedCount int64

Lines of code removed

type BetaAnalyticsOfficeMetrics struct { Excel; Outlook; Powerpoint; Word }

Office Agent activity metrics for a single user on a given day, broken out by Office product.

type BetaAnalyticsOfficeProductMetrics struct { ConnectorsUsedCount; DistinctConnectorsUsedCount; DistinctSessionCount; /* 3 more */ }

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

ConnectorsUsedCount int64

Number of MCP connector invocations

DistinctConnectorsUsedCount int64

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.

DistinctSessionCount int64

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.

DistinctSkillsUsedCount int64

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.

MessageCount int64

Number of messages sent

SkillsUsedCount int64

Number of skill invocations

type BetaAnalyticsOrder string

Sort direction: asc or desc. Defaults to asc for the endpoint's sort column and to desc when order_by names a metric (a top-N ranking). Applies to order_by, or to the endpoint's default sort field when order_by is omitted.

One of the following:
const BetaAnalyticsOrderAsc BetaAnalyticsOrder = "asc"
const BetaAnalyticsOrderDesc BetaAnalyticsOrder = "desc"
type BetaAnalyticsPluginActivity struct { ClaudeCodeMetrics; CoworkMetrics; DistinctUserCount; /* 9 more */ }

Per-plugin install + invocation activity for a given day.

With group_by[]=user_id / rbac_group_id / product (cowork, claude_code and chat_cowork_unified only on this endpoint) each row is one (plugin, user), (plugin, group), or (plugin, product) cut: the flat user_id / rbac_group_id / product keys carry the cut and the counts are scoped to it.

type BetaAnalyticsPluginChatCoworkUnifiedMetrics struct { DistinctSessionPluginUsedCount }

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

DistinctSessionPluginUsedCount int64

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.

type BetaAnalyticsPluginClaudeCodeMetrics struct { DistinctSessionPluginUsedCount }

Claude Code activity metrics for a single plugin on a given day.

DistinctSessionPluginUsedCount int64

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

type BetaAnalyticsPluginCoworkMetrics struct { DistinctSessionPluginUsedCount }

Cowork activity metrics for a single plugin on a given day.

DistinctSessionPluginUsedCount int64

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

type BetaAnalyticsPluginGroupBy string

A dimension to group plugin activity by.

One of the following:
const BetaAnalyticsPluginGroupByProduct BetaAnalyticsPluginGroupBy = "product"
const BetaAnalyticsPluginGroupByRBACGroupID BetaAnalyticsPluginGroupBy = "rbac_group_id"
const BetaAnalyticsPluginGroupByUserID BetaAnalyticsPluginGroupBy = "user_id"
type BetaAnalyticsProductFilter string

Publicly documented product surfaces. claude-tag is Claude Tag, the Claude product in Slack. chat_cowork_unified is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of chat or cowork. It is accepted as a filter only where Chat and Cowork unified is available.

One of the following:
const BetaAnalyticsProductFilterChat BetaAnalyticsProductFilter = "chat"
const BetaAnalyticsProductFilterChatCoworkUnified BetaAnalyticsProductFilter = "chat_cowork_unified"
const BetaAnalyticsProductFilterClaudeTag BetaAnalyticsProductFilter = "claude-tag"
const BetaAnalyticsProductFilterClaudeCode BetaAnalyticsProductFilter = "claude_code"
const BetaAnalyticsProductFilterClaudeDesign BetaAnalyticsProductFilter = "claude_design"
const BetaAnalyticsProductFilterClaudeInChrome BetaAnalyticsProductFilter = "claude_in_chrome"
const BetaAnalyticsProductFilterCowork BetaAnalyticsProductFilter = "cowork"
const BetaAnalyticsProductFilterOfficeAgent BetaAnalyticsProductFilter = "office_agent"
type BetaAnalyticsProjectActivity struct { CreatedAt; CreatedBy; DistinctConversationCount; /* 7 more */ }

Per-project activity data for a given day.

type BetaAnalyticsProjectGroupBy string

A dimension to group chat project activity by.

One of the following:
const BetaAnalyticsProjectGroupByRBACGroupID BetaAnalyticsProjectGroupBy = "rbac_group_id"
const BetaAnalyticsProjectGroupByUserID BetaAnalyticsProjectGroupBy = "user_id"
type BetaAnalyticsReportUserActor struct { Type: "user_actor"; Deleted; EmailAddress; /* 2 more */ }
Type UserActor

Actor type. Always "user_actor".

Deleted bool

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.

EmailAddress string

The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.

Name string

The user's current full name. Null when the user has not set one. "Deleted User" when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.

UserID string

Tagged user ID.

type BetaAnalyticsScienceMetrics struct { DelegationCount; DistinctSessionCount; MessageCount; /* 2 more */ }

Claude Science activity metrics for a single user on a given day.

DelegationCount int64

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

DistinctSessionCount int64

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.

MessageCount int64

Number of messages sent in Claude Science sessions

RemoteComputeJobCount int64

Number of remote compute jobs launched from Claude Science sessions

SkillsUsedCount int64

Total number of skill invocations in Claude Science sessions

type BetaAnalyticsServerToolUse struct { WebSearchRequests }
WebSearchRequests int64

The number of web search requests made.

type BetaAnalyticsServiceAccountActor struct { Type: "service_account_actor"; ServiceAccountID }
Type ServiceAccountActor
ServiceAccountID string

Tagged service account ID.

type BetaAnalyticsServiceTier string
One of the following:
const BetaAnalyticsServiceTierBatch BetaAnalyticsServiceTier = "batch"
const BetaAnalyticsServiceTierFlex BetaAnalyticsServiceTier = "flex"
const BetaAnalyticsServiceTierFlexDiscount BetaAnalyticsServiceTier = "flex_discount"
const BetaAnalyticsServiceTierPriority BetaAnalyticsServiceTier = "priority"
const BetaAnalyticsServiceTierPriorityOnDemand BetaAnalyticsServiceTier = "priority_on_demand"
const BetaAnalyticsServiceTierStandard BetaAnalyticsServiceTier = "standard"
type BetaAnalyticsSingleDayActivitySummary struct { AssignedSeatCount; CoworkDailyActiveUserCount; CoworkMonthlyActiveUserCount; /* 32 more */ }

Per-day entry in the /summaries response.

type BetaAnalyticsSkillActivity struct { AttributedListPrice; ChatMetrics; ClaudeCodeMetrics; /* 15 more */ }

Per-skill activity data for a given day.

type BetaAnalyticsSkillChatCoworkUnifiedChatMetrics struct { DistinctConversationSkillUsedCount }

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

DistinctConversationSkillUsedCount int64

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.

type BetaAnalyticsSkillChatCoworkUnifiedMetrics struct { Chat; Sessions }

A skill's use in Chat and Cowork unified on one day: chat holds its use in chat conversations and sessions its use in Cowork sessions.

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

DistinctConversationSkillUsedCount int64

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.

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

DistinctSessionSkillUsedCount int64

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.

type BetaAnalyticsSkillChatCoworkUnifiedSessionsMetrics struct { DistinctSessionSkillUsedCount }

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

DistinctSessionSkillUsedCount int64

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.

type BetaAnalyticsSkillChatMetrics struct { DistinctConversationSkillUsedCount }

Claude.ai activity metrics for a single skill on a given day.

DistinctConversationSkillUsedCount int64

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.

type BetaAnalyticsSkillClaudeCodeMetrics struct { DistinctSessionSkillUsedCount }

Claude Code activity metrics for a single skill on a given day.

DistinctSessionSkillUsedCount int64

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.

type BetaAnalyticsSkillCoworkMetrics struct { DistinctSessionSkillUsedCount }

Cowork activity metrics for a single skill on a given day.

DistinctSessionSkillUsedCount int64

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.

type BetaAnalyticsSkillGroupBy string

A dimension to group skill activity by.

One of the following:
const BetaAnalyticsSkillGroupByProduct BetaAnalyticsSkillGroupBy = "product"
const BetaAnalyticsSkillGroupByRBACGroupID BetaAnalyticsSkillGroupBy = "rbac_group_id"
const BetaAnalyticsSkillGroupByUserID BetaAnalyticsSkillGroupBy = "user_id"
type BetaAnalyticsSkillOfficeMetrics struct { Excel; Outlook; Powerpoint; Word }

Office Agent activity metrics for a single skill on a given day, broken out by Office product.

type BetaAnalyticsSkillOfficeProductMetrics struct { DistinctSessionSkillUsedCount }

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

DistinctSessionSkillUsedCount int64

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.

type BetaAnalyticsSpeed string
One of the following:
const BetaAnalyticsSpeedFast BetaAnalyticsSpeed = "fast"
const BetaAnalyticsSpeedStandard BetaAnalyticsSpeed = "standard"
type BetaAnalyticsTimeBucketWidth string
One of the following:
const BetaAnalyticsTimeBucketWidthDay BetaAnalyticsTimeBucketWidth = "1d"
const BetaAnalyticsTimeBucketWidthHour BetaAnalyticsTimeBucketWidth = "1h"
const BetaAnalyticsTimeBucketWidthMinute BetaAnalyticsTimeBucketWidth = "1m"
type BetaAnalyticsTokenType string
One of the following:
const BetaAnalyticsTokenTypeCacheCreationEphemeral1hInputTokens BetaAnalyticsTokenType = "cache_creation.ephemeral_1h_input_tokens"
const BetaAnalyticsTokenTypeCacheCreationEphemeral5mInputTokens BetaAnalyticsTokenType = "cache_creation.ephemeral_5m_input_tokens"
const BetaAnalyticsTokenTypeCacheReadInputTokens BetaAnalyticsTokenType = "cache_read_input_tokens"
const BetaAnalyticsTokenTypeOutputTokens BetaAnalyticsTokenType = "output_tokens"
const BetaAnalyticsTokenTypeUncachedInputTokens BetaAnalyticsTokenType = "uncached_input_tokens"
type BetaAnalyticsToolActionCounts struct { AcceptedCount; RejectedCount }

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

AcceptedCount int64

Number of tool proposals accepted

RejectedCount int64

Number of tool proposals rejected

type BetaAnalyticsToolActions struct { EditTool; MultiEditTool; NotebookEditTool; WriteTool }

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

type BetaAnalyticsUsageBucketedResult struct { CacheCreation; CacheReadInputTokens; ClaudeTagCategory; /* 12 more */ }
type BetaAnalyticsUsageCostInferenceGeo string
One of the following:
const BetaAnalyticsUsageCostInferenceGeoGlobal BetaAnalyticsUsageCostInferenceGeo = "global"
const BetaAnalyticsUsageCostInferenceGeoUs BetaAnalyticsUsageCostInferenceGeo = "us"
type BetaAnalyticsUsageCostProductFilter string

Publicly documented product surfaces. claude_tag is Claude Tag, the Claude product in Slack. chat_cowork_unified is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of chat or cowork. It is accepted as a filter only where Chat and Cowork unified is available.

One of the following:
type BetaAnalyticsUsageCostSortOrder string
One of the following:
const BetaAnalyticsUsageCostSortOrderAsc BetaAnalyticsUsageCostSortOrder = "asc"
const BetaAnalyticsUsageCostSortOrderDesc BetaAnalyticsUsageCostSortOrder = "desc"
type BetaAnalyticsUsageReportTimeBucket struct { EndingAt; Results; StartingAt }
type BetaAnalyticsUsageUsersItem struct { Actor; CacheCreation; CacheReadInputTokens; /* 16 more */ }
type BetaAnalyticsUser struct { Type: "user"; ID; EmailAddress }

A user in the organization, identified by tagged id and email address.

Type User

Object type. Always user.

defaultuser
ID string

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

EmailAddress string

Email address of the user

type BetaAnalyticsUserActivity struct { ChatMetrics; ClaudeCodeMetrics; CoworkMetrics; /* 11 more */ }

Per-user activity data for a given day.

type BetaAnalyticsUserActor struct { Type: "user_actor"; Deleted; EmailAddress; /* 2 more */ }
Type UserActor

Actor type. Always "user_actor".

Deleted bool

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.

EmailAddress string

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

Name string

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") or null.

UserID string

Tagged user ID.

type BetaAnalyticsUserGroupBy string

A dimension to group user activity by.

アナリティクスサマリー

アクティビティサマリーの取得
client.Beta.Organization.Analytics.Summaries.List(ctx, query) (*PageCursor[BetaAnalyticsSingleDayActivitySummary], error)
GET/v1/organizations/analytics/summaries

指定した期間における組織全体のアクティビティサマリーを取得します。

アナリティクスユーザー

ユーザーアクティビティの一覧を取得
client.Beta.Organization.Analytics.Users.List(ctx, query) (*PageCursor[BetaAnalyticsUserActivity], error)
GET/v1/organizations/analytics/users

指定した日のユーザーごとのアクティビティを、カーソルベースのページネーションで取得します。

アナリティクスアプリチャットプロジェクト

チャットプロジェクトの使用状況の取得
client.Beta.Organization.Analytics.Apps.Chat.Projects.List(ctx, query) (*PageCursor[BetaAnalyticsProjectActivity], error)
GET/v1/organizations/analytics/apps/chat/projects

指定した日のプロジェクトごとのアクティビティを、カーソルベースのページネーションで取得します。

アナリティクスコネクター

コネクター使用量を取得
client.Beta.Organization.Analytics.Connectors.List(ctx, query) (*PageCursor[BetaAnalyticsConnectorActivity], error)
GET/v1/organizations/analytics/connectors

指定した日のコネクターごとの使用状況を、カーソルベースのページネーションで取得します。

アナリティクスプラグイン

プラグイン使用量を取得
client.Beta.Organization.Analytics.Plugins.List(ctx, query) (*PageCursor[BetaAnalyticsPluginActivity], error)
GET/v1/organizations/analytics/plugins

指定した日のプラグインごとのインストールおよび呼び出しの使用状況を、ページネーション付きで取得します。

アナリティクススキル

スキル使用量を取得
client.Beta.Organization.Analytics.Skills.List(ctx, query) (*PageCursor[BetaAnalyticsSkillActivity], error)
GET/v1/organizations/analytics/skills

指定した日のスキルごとの使用状況を、カーソルベースのページネーションで取得します。

アナリティクスArtifacts

Artifactsのアクティビティを取得
client.Beta.Organization.Analytics.Artifacts.List(ctx, query) (*PageCursor[BetaAnalyticsArtifactActivity], error)
GET/v1/organizations/analytics/artifacts

指定した日のアーティファクト作成アクティビティを、MIMEタイプごとに分類して取得します。

アナリティクス使用量

ディメンション別のトークン使用量を取得
client.Beta.Organization.Analytics.Usage.List(ctx, params) (*ReportPageCursor[BetaAnalyticsUsageItem], error)
GET/v1/organizations/analytics/usage
Requires anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.

指定した日付範囲におけるトークン使用量を、ディメンション別に分けて取得します。

アナリティクスコスト

ディメンション別のコストを取得
client.Beta.Organization.Analytics.Cost.List(ctx, params) (*ReportPageCursor[BetaAnalyticsCostItem], error)
GET/v1/organizations/analytics/cost
Requires anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.

指定した日付範囲におけるUSD建てのコストを、ディメンション別に分けて取得します。

アナリティクス使用量レポート

トークン使用量の推移の取得
client.Beta.Organization.Analytics.UsageReport.List(ctx, query) (*ReportPageCursor[BetaAnalyticsUsageReportTimeBucket], error)
GET/v1/organizations/analytics/usage_report

[レガシー] 指定した日付範囲におけるトークン使用量の推移を取得します。

アナリティクスユーザー使用状況レポート

ユーザーごとのトークン使用量の取得
client.Beta.Organization.Analytics.UserUsageReport.List(ctx, query) (*ReportPageCursor[BetaAnalyticsUsageUsersItem], error)
GET/v1/organizations/analytics/user_usage_report

[レガシー] 指定した日付範囲におけるユーザーごとのトークン使用量を取得します。

アナリティクスコストレポート

コストの推移の取得
client.Beta.Organization.Analytics.CostReport.List(ctx, query) (*ReportPageCursor[BetaAnalyticsCostReportTimeBucket], error)
GET/v1/organizations/analytics/cost_report

[レガシー] 指定した日付範囲におけるUSD建てのコストの推移を取得します。

アナリティクスユーザーコストレポート

ユーザーごとのコストの取得
client.Beta.Organization.Analytics.UserCostReport.List(ctx, query) (*ReportPageCursor[BetaAnalyticsCostUsersItem], error)
GET/v1/organizations/analytics/user_cost_report

[レガシー] 指定した日付範囲におけるユーザーごとのUSD建てのコストを取得します。