claude_tag_user_id returns one row per attributed Slack user. Use the rows to attribute spend to people or departments for showback and chargeback reporting.
The Analytics API is available to organizations on a Claude Enterprise plan. To call it, you need an API key with the read:analytics scope. Only your organization’s primary owner can create that key, at claude.ai/admin-settings/api-access. See Get access to the Claude Enterprise Analytics API for the steps.
On the analytics page in claude.ai you see spend by channel and by kind of work, not by user. For spend by user, use the cost report.
Get spend per user
Call the cost report withclaude_tag_user_id in group_by[]. This example requests one week of channel spend, one row per user per day:
products[]=claude-tag limits the report to Claude’s work in Slack channels, which bills to your organization’s usage balance. DMs with Claude bill to the sender’s own seat and aren’t reported under claude-tag, so this filter leaves them out.
Each row’s claude_tag_user_id is a Slack user ID such as U0123ABCDEF, not a claude.ai user ID. A row with a null claude_tag_user_id is channel spend with no attributed user, and How costs map to users lists those cases. For the full parameters, response schema, and data freshness, see the cost report reference, which also covers grouping by slack_channel_id and claude_tag_category.
How costs map to users
Channel spend is attributed to at most one Slack user at a time, by these rules:- Work someone asked for goes to the person who asked. Spend for each of Claude’s replies goes to the member whose message Claude was responding to, so when several people address Claude in one thread, the spend is split across them.
- Work Claude picks up on its own goes to a person in the thread where it did the work. That person is the member whose message Claude acted on, if there is one. Otherwise it is whoever mentioned Claude into the thread, or, if no one did, the person who started the thread.
- Scheduled routines go to the person who set the routine up.
- The null row collects spend with no attributable person. Examples are work Claude started on its own in a thread that another app or bot posted, and a routine whose creator can’t be identified. Monitoring, meaning Claude reading a channel it was asked to watch, is never attributed to a user. Per-user rows therefore sum to less than your total channel spend.
Related resources
- Get cost over time: the cost report’s parameters, response schema, and limits
- Analytics APIs: key setup, data freshness, and pagination
- Set a spend limit: what bills to the organization’s balance versus a user’s seat