---
title: "Claude Code (Enterprise)"
canonical_url: "https://docs.getdx.com/connectors/claude-code-enterprise/"
md_url: "https://docs.getdx.com/connectors/claude-code-enterprise.md"
last_updated: "2026-06-18"
---

# 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](https://support.claude.com/en/articles/13703965-claude-enterprise-analytics-api-reference-guide). 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)](https://docs.getdx.com/connectors/claude-code/) 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)](https://docs.getdx.com/connectors/claude-code-otel/) connector.

> **Note**: Do not run this connector alongside the [Claude Code (OTel)](https://docs.getdx.com/connectors/claude-code-otel/) connector. Both report the same underlying usage, which double-counts activity and spend. If both are connected, DX reporting shows only Claude Code (Enterprise) data and excludes the OTel data. See [Why is data from only one Claude Code connector shown in reports?](https://docs.getdx.com/knowledgebase/claude-code-duplicate-data/) for details.

Please refer to the API documentation below and our [schema explorer](https://docs.getdx.com/schema/) 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:analytics` scope 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](https://claude.ai/analytics/api-keys).

**Note** Per the [Claude Enterprise Analytics API reference guide](https://support.claude.com/en/articles/13703965-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](https://support.claude.com/en/articles/13703965-claude-enterprise-analytics-api-reference-guide) |
| GET /v1/organizations/analytics/user_usage_report | [Link](https://support.claude.com/en/articles/13703965-claude-enterprise-analytics-api-reference-guide) |
| GET /v1/organizations/analytics/user_cost_report | [Link](https://support.claude.com/en/articles/13703965-claude-enterprise-analytics-api-reference-guide) |


## Testing your connection

You can test the Enterprise Analytics API endpoint directly using the following curl command:

```bash
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. |
---

## Sitemap

[Overview of all docs pages](/llms.txt)
