Claude Code (Enterprise)
By integrating Claude Code (Enterprise) with DX, you can analyze AI usage metrics within your Anthropic Enterprise organization. This includes per-user daily engagement data such as conversation counts, message activity, code contributions, tool acceptance rates, web search usage, and per-model token consumption and costs.
DX imports these metrics using the Claude Enterprise Analytics API. The data available in DX is restricted to what these API endpoints provide, including daily aggregated per-user activity and per-model token and cost breakdowns.
Billing plan compatibility
This connector is designed for organizations on the Claude for Enterprise billing plan. Anthropic offers different billing plans with varying analytics capabilities:
- Claude for Enterprise: Supported by this connector.
- Pay-as-you-go (Anthropic Console): Uses a different Analytics API. See the Claude Code (Anthropic Console) connector.
- Claude for Individuals and Teams: Even plans that do not support an Analytics API can be connected to DX via the Claude Code OpenTelemetry (OTel) connector.
When to use this connector: Set up Claude Code (Enterprise) for any users who access Claude directly through Anthropic — without routing through a 3rd-party API provider.
- All users on Claude for Enterprise (no 3rd-party keys): Use this connector only.
- All users on Bedrock or Vertex AI: Use the Claude Code (OTel) connector only.
- All users on pay-as-you-go Anthropic Console (no 3rd-party keys): Use the Claude Code (Anthropic Console) connector only.
- Mixed org — some users on Enterprise, some on Bedrock/Vertex: Set up both this connector and Claude Code (OTel). Enterprise covers users who access Claude directly; OTel covers users going through 3rd-party providers. When a user has activity from both, OTel data takes precedence in DX reports.
See Which Claude Code connector should I use? for full guidance.
To understand how DX identifies, merges, and links Claude Code users across connectors, see How does DX link Claude Code users?.
Please refer to the API documentation below and our schema explorer to see what data DX imports.
Prerequisites
To connect Claude Code (Enterprise) to DX, you need:
- an Anthropic Enterprise plan organization
- an API key with the
read:analyticsscope generated by the Primary Owner within your Enterprise organization
Setup instructions
Follow the steps below to connect Claude Code (Enterprise) to DX.
Step 1
Log in to your Anthropic Enterprise organization and navigate to claude.ai/analytics/api-keys.
Note Per the Claude Enterprise Analytics API reference guide, in order to mint new analytics API keys, you must be a Primary Owner within your Enterprise organization.
Step 2
Ensure that API access is enabled by toggling the switch on. If access is disabled, all API requests will be denied.
Step 3
Click Create API Key and generate a new key with the read:analytics scope and copy the generated API key.
Note You can create multiple keys for your organization, but rate limits apply at the organization level, not the key level.
Step 4
- Navigate to the connections page in DX and select “+ Connection” in the top right.
- Select “Claude Code (Enterprise)” as the connector type.
- Enter your API key in the credentials field.
- Test the connection to ensure proper authentication.
Data availability
- Daily engagement data is aggregated per organization, per day.
- Token usage and cost data is imported per user, per model, per day.
- Data is only available for dates on or after January 1, 2026.
- There is a three-day delay in data availability. Data for day N-1 is aggregated at 10:00 UTC on day N and becomes available for querying three days after aggregation.
API reference
The table below lists the specific API endpoints that are used by DX.
| Endpoint | Documentation |
|---|---|
| GET /v1/organizations/analytics/users | Link |
| GET /v1/organizations/analytics/user_usage_report | Link |
| GET /v1/organizations/analytics/user_cost_report | Link |
Testing your connection
You can test the Enterprise Analytics API endpoint directly using the following curl command:
curl -X GET "https://api.anthropic.com/v1/organizations/analytics/users?date=2026-01-15&limit=3" \
--header "x-api-key: YOUR_API_KEY"
Replace YOUR_API_KEY with your actual API key and adjust the date to a recent date (at least three days ago) when you expect user activity. A successful response will return per-user engagement data, while an empty data array indicates no usage activity for that date.
Errors
The table below lists potential error codes when adding a connection in DX.
| Error | Description |
|---|---|
invalid_credentials |
Your API key is not valid, has expired, or does not have the read:analytics scope. |
no_resources |
No usage activity was found for your organization. |