Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

analytics-api changedmanage-claude/analytics-api

Nearest release: v2.1.333, published 4 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+24added
Lines−15removed
From line 6 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits29to this page, all time

### Cowork connector calls in cloud sessions

The whole hunk

from line 6, old and new numbered
/
lines
from line 6
66 
77Anthropic provides two product analytics APIs, and which one you use depends on which Claude product your organization manages:
88 
9* The **Claude Code Analytics API** reports daily Claude Code productivity metrics for organizations that use the Claude Platform. It is part of the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and uses an Admin API key.
9* The **Claude Code Analytics API** reports daily Claude Code productivity metrics for organizations that use the Claude Platform. It is part of the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and uses a Console Admin API key.
1010* The **Claude Enterprise Analytics API** reports organization-wide engagement, adoption, and cost data across Claude products (chat, projects, Claude Code, and more) for Claude Enterprise organizations. It uses an Analytics API key created in claude.ai.
1111 
1212The two APIs use different key types, created in different places by different roles. This page describes which API fits your organization and how to create the right key.
from line 15
1515 
1616| API | Key type | Created in | Who can create it | What it covers |
1717| ----- | ----- | ----- | ----- | ----- |
18| **Claude Code Analytics API** | Admin API key | [Admin keys](https://platform.claude.com/settings/admin-keys) page in the Claude Console | Organization admin | Daily Claude Code metrics for each user: sessions, lines of code, commits, pull requests, tool acceptance, and estimated cost by model |
19| **Claude Enterprise Analytics API** | Analytics API key | [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access) | Primary owner | Organization-wide engagement and adoption (user activity, active-user summaries, project, skill, and connector usage), plus cost and usage reports |
18| **Claude Code Analytics API** | Console Admin API key | [Admin keys](https://platform.claude.com/settings/admin-keys) page in the Claude Console | Organization admin | Daily Claude Code metrics for each user: sessions, lines of code, commits, pull requests, tool acceptance, and estimated cost by model |
19| **Claude Enterprise Analytics API** | Analytics API key | [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**) | Primary owner | Organization-wide engagement and adoption (user activity, active-user summaries, project, skill, and connector usage), plus cost and usage reports |
2020 
2121The two key types differ in what they can call:
2222 
23* An **Admin API key** (`sk-ant-admin01-...`) cannot call the Claude Enterprise Analytics API.
24* An **Analytics API key** is a key created in claude.ai with the `read:analytics` scope. Besides the Claude Enterprise Analytics API, it works with the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api). To call Admin API endpoints such as members and invites, a key created in claude.ai needs other scopes (see [Choose scopes for a Claude Enterprise key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#choose-scopes-for-a-claude-enterprise-key)).
23* A **Console Admin API key** (`sk-ant-admin01-...`) cannot call the Claude Enterprise Analytics API.
24* An **Analytics API key** is an Enterprise Admin API key, created in claude.ai, with the `read:analytics` scope. Besides the Claude Enterprise Analytics API, it works with the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api). To call Admin API endpoints, such as those for members and invites, an Enterprise Admin API key needs other scopes. See the [Enterprise Admin API key scopes](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes) page.
2525 
2626The Claude Code Analytics API and the Claude Enterprise Analytics API both appear under the [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization), but they are separate APIs. If your organization uses both the Claude Platform and Claude Enterprise, you can provision both keys and use each API for its own data.
2727 
from line 29
2929 Looking for token usage and cost data rather than product analytics? See the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which serves both Claude Console and Claude Enterprise organizations.
3030</Note>
3131 
32<Note>
33 If you want to view engagement and adoption data in the product rather than programmatically, use the [Analytics dashboard](https://claude.ai/analytics/activity) in claude.ai. For governance and auditing use cases (individual user actions, raw activity events, conversation content), see the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api).
34</Note>
32If you want to view engagement and adoption data in the product rather than programmatically, use the [Analytics dashboard](https://claude.ai/analytics/activity) in claude.ai. For governance and auditing use cases (individual user actions, raw activity events, conversation content), see the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api).
3533 
3634## Get access to the Claude Code Analytics API
3735 
from line 36
3836The Claude Code Analytics API is free for Claude Console organizations on the Claude API. Your organization needs [access to the Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api#availability), and an organization admin creates the key.
3937 
4038<Steps>
41 <Step title="Create an Admin API key">
42 Follow the steps in [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization).
39 <Step title="Create a Console Admin API key">
40 Follow the steps in [Create a key for a Claude Console organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) on the Admin API keys and tokens page.
4341 </Step>
4442 
4543 <Step title="Call the API">
from line 59
6159 
6260<Steps>
6361 <Step title="Sign in as the primary owner">
64 Only the primary owner of the organization can enable API access and create Analytics API keys.
62 Only the primary owner of the organization can turn on the Analytics API and create Analytics API keys.
6563 </Step>
6664 
67 <Step title="Enable API access and create a key">
68 Go to [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access) and enable public API access, then create an Analytics API key. Keys carry the `read:analytics` scope. Copy the displayed secret and store it in your secrets manager.
65 <Step title="Turn on the Analytics API and create a key">
66 Go to the [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**) and turn on the **Analytics API** toggle. Then, in the **Keys** section, click **Create key**, name the key, select the `read:analytics` scope, and click **Create**. Copy the displayed secret and store it in your secrets manager.
6967 </Step>
7068 
7169 <Step title="Call the API">
72 Pass the key in the `x-api-key` header and include the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header on every request. Endpoints live under `https://api.anthropic.com/v1/organizations/analytics/`. For request examples, parameters, and response schemas, see the [Claude Enterprise Analytics API reference](https://platform.claude.com/docs/en/api/beta/organization/analytics).
70 In a cURL request, pass the key in the `x-api-key` header and include the `anthropic-version` header ([API versions](https://platform.claude.com/docs/en/api/versioning)). Endpoints live under `https://api.anthropic.com/v1/organizations/analytics/`. For request examples, parameters, and response schemas, see the [Claude Enterprise Analytics API reference](https://platform.claude.com/docs/en/api/beta/organization/analytics).
7371 </Step>
7472</Steps>
7573 
from line 149
151149 
152150For other analytics changes with customer-managed encryption keys, see [What CMEK covers on Claude Enterprise](https://platform.claude.com/docs/en/manage-claude/cmek-coverage-claude-enterprise#turned-off-or-changed).
153151 
152### Cowork connector calls in cloud sessions
153 
154Some Cowork sessions run in the cloud in Anthropic-managed environments instead of on the user’s machine. `connectors_used_count` in [user activity](https://platform.claude.com/docs/en/api/beta/organization/analytics/users/list) counts the successful connector calls made in those cloud sessions. For dates before November 9, 2026, it leaves out most of them. This applies to `connectors_used_count` in both `cowork_metrics` and `chat_cowork_unified_metrics.sessions`.
155 
156Earlier dates are not restated. If your organization runs Cowork sessions in the cloud, these counts rise on November 9, 2026, with no change in use. As a result, do not compare totals from before and after that date. The count for the most recent available day can also be low until the next day’s data arrives.
157 
158The following numbers leave out most connector use in cloud sessions for all dates:
159 
160* **Distinct connectors:** In user activity, this applies to `distinct_connectors_used_count` in the same two objects. A user can have connector calls and zero distinct connectors on the same day.
161* **Connector usage:** In [connector usage](https://platform.claude.com/docs/en/api/beta/organization/analytics/connectors/list), this applies to the Cowork numbers for each connector, such as `cowork_metrics.distinct_session_connector_used_count`. They can be lower than the call counts in user activity suggest.
162 
154163## Next steps
155164 
156165<CardGroup cols={2}>
157166 <Card title="Claude Code Analytics API" href="https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api">
158 Track Claude Code sessions, code changes, and tool usage with an Admin API key.
167 Track Claude Code sessions, code changes, and tool usage with a Console Admin API key.
159168 </Card>
160169 
161170 <Card title="Usage and Cost Analytics API" href="https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api">
Feedback