Linking Anthropic as a source
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

This source is currently in beta. It works end to end, but you may still hit rough edges – let us know if you do.
The Anthropic connector syncs users, invites, workspaces, and more into the PostHog data warehouse, so you can analyze them alongside your product data.
Prerequisites
Credentials that can read the data you want to sync. PostHog only reads data, so read access is enough.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
Enter your Anthropic Admin API key to pull your organization's Claude usage, cost, and admin data.
Create an Admin API key (prefixed sk-ant-admin...) in your Anthropic Console. Only organization admins can create one, and the Admin API is not available for individual accounts.
Some tables need a Claude Enterprise key instead, created by your primary owner in claude.ai organization settings. A key works with one API only, so pick the one that matches the tables you want.
The per-seat activity, cost and token usage tables, and the connector, plugin, skill and summary tables, come from the Claude Enterprise Analytics API. They need a Claude Enterprise key carrying the read:analytics scope.
The group, group membership and custom role tables come from the Claude Enterprise user management API. They need an Admin API key carrying the read:rbac_groups scope for the group tables, or read:members for the custom role tables.
You'll be asked for:
- Admin API key: for example
sk-ant-admin....
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
Some Anthropic tables sync incrementally, so later runs only fetch new or updated rows. The rest are full refresh.
Configuration
| Option | Type | Required |
|---|---|---|
Admin API key | password | Yes |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
users | Members of your Anthropic organization. | Full refresh | — | — |
invites | Pending and historical invitations to join your Anthropic organization. | Full refresh | — | — |
workspaces | Workspaces in your Anthropic organization (includes archived workspaces). | Full refresh | — | — |
api_keys | API keys provisioned across your Anthropic organization's workspaces. | Full refresh | — | — |
workspace_members | Membership rows mapping users to the workspaces they belong to, one row per (workspace, user). | Full refresh | — | — |
rbac_groups | Groups in your Claude Enterprise organization, the join between members and the custom roles that grant their permissions. Groups are owned by the enterprise as a whole, so this table spans every linked organization. | Full refresh | — | — |
rbac_group_members | Membership rows mapping users to the Claude Enterprise groups they hold, one row per (group, user). Joins to users on user_id and to rbac_groups on group_id. | Full refresh | — | — |
rbac_roles | Custom roles defined in your Claude Enterprise organization, the lookup resolving the role IDs carried on rbac_groups. The role catalog is per-organization while groups span the enterprise, so a group can name a role this table does not contain. | Full refresh | — | — |
rbac_role_permissions | What each custom role grants, one row per (role, action, resource). Anthropic omits rows for features your organization has not enabled. A capability_access_all or capability_access_all_ga action is a blanket grant listed as a single row, so a tally of a role's access has to treat it as covering every product feature it describes rather than only the features named in other rows. | Full refresh | — | — |
usage_report | Claude Messages API token usage aggregated into daily buckets, broken down by model, workspace, API key, service tier, context window, and inference geo. | Incremental, Full refresh | starting_at | — |
cost_report | Daily cost in USD for your Anthropic organization, broken down by workspace and cost description. | Incremental, Full refresh | starting_at | — |
claude_code_analytics | Claude Code productivity metrics, one row per user per day: sessions, lines of code, commits, pull requests, and tool-action accept/reject counts. | Incremental, Full refresh | date | — |
claude_code_model_breakdown | Per-model token usage and estimated cost for Claude Code, one row per user per day per model. | Incremental, Full refresh | date | — |
analytics_user_activity | Per-seat engagement across Claude products, one row per organization member per UTC day. Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork, design, office (per Office app) and science. | Incremental, Full refresh | date | — |
analytics_user_cost | Cost attributed to a seat user, one row per member per UTC day. Covers only cost that belongs to a seat user; org-wide totals including direct API-key traffic are in cost_report. | Incremental, Full refresh | starting_at | — |
analytics_user_usage | Token usage attributed to a seat user, one row per member per UTC day. Covers only usage that belongs to a seat user; org-wide totals including direct API-key traffic are in usage_report. | Incremental, Full refresh | starting_at | — |
analytics_connector_usage | Connector adoption, one row per connector per UTC day. Connector names are normalized across their sources, so "Atlassian MCP server" and "mcp-atlassian" both appear as "atlassian". Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork and office (per Office app). | Incremental, Full refresh | date | — |
analytics_plugin_usage | Plugin installs and invocations across Cowork and Claude Code, one row per plugin per UTC day. The plugin_name value "third-party" is an aggregate bucket rather than a plugin: it collects activity the reporting client sent no plugin name for. | Incremental, Full refresh | date | — |
analytics_skill_usage | Skill adoption and the spend attributed to each skill, one row per skill per UTC day. A skill counts as used only when it is explicitly activated, so a skill that is merely installed, listed, or read as a plain file is not counted. Metric columns are prefixed by the product surface they measure: chat, claude_code, cowork and office (per Office app). | Incremental, Full refresh | date | — |
analytics_summaries | Organization-wide activity and adoption as Anthropic rolls it up, one row per UTC day. Active-user counts come in three windows: the day itself, and the 7- and 30-day rolling windows ending on it. Per-product columns are omitted while the per-product breakdown is not enabled for your organization. | Incremental, Full refresh | starting_at | — |
Troubleshooting
- If the connection fails with an authorization error, the admin API key is wrong, expired, or has been revoked. Create a new one, then reconnect the source.
- If a table syncs no rows, the credential may not have access to that data. Check its permissions, then reconnect the source.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.