claude-code - 💡(How to fix) Fix Feature Request: Admin API for claude.ai subscription billing, reporting, and user lifecycle (Team/Enterprise)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The current Admin API provides excellent programmatic access to API token usage (via `/v1/organizations/cost_report` and `/v1/organizations/usage_report/messages`), but there is no equivalent for the claude.ai subscription side — no billing data, no invoice access, and no programmatic user onboarding/offboarding for Team/Enterprise seat plans.

Error Message

  • Security: Manual offboarding is error-prone — departed employees can retain access

Root Cause

  • Finance reporting: Claude spend is invisible to cost dashboards without an API
  • Security: Manual offboarding is error-prone — departed employees can retain access
  • Cost control: Unused seats can't be detected or reclaimed automatically
  • Parity: The API-side already has this infrastructure; the subscription side is the gap

The Admin API key (`sk-ant-admin`) infrastructure already exists — this is a data and action exposure gap, not an infrastructure gap.

Code Example

{
  "spendCents": 1240,
  "fastPremiumRequests": 47,
  "name": "Jane Smith",
  "email": "[email protected]",
  "role": "member"
}

---

GET /v1/organizations/subscription/invoices

---

GET /v1/organizations/subscription/usage

---

GET /v1/organizations/subscription/summary

---

POST /v1/organizations/members
DELETE /v1/organizations/members/{user_id}
RAW_BUFFERClick to expand / collapse

Summary

The current Admin API provides excellent programmatic access to API token usage (via `/v1/organizations/cost_report` and `/v1/organizations/usage_report/messages`), but there is no equivalent for the claude.ai subscription side — no billing data, no invoice access, and no programmatic user onboarding/offboarding for Team/Enterprise seat plans.

The Gap

CapabilityAvailable today?
API token usage by workspace/model✅ `/v1/organizations/cost_report`
Per-user Claude Code activity✅ `/v1/organizations/usage_report/claude_code`
claude.ai subscription invoices❌ Manual download only
Per-user seat cost / usage spend❌ Not available
Monthly subscription summary❌ Not available
Add a user to the Team plan programmatically❌ Manual only
Remove a user from the Team plan programmatically❌ Manual only
SCIM provisioning (Team plan)❌ Enterprise only

Currently the only ways to manage or access subscription data are:

  1. Manual actions in the claude.ai/settings UI
  2. A GDPR data export — which gives conversation counts but no cost data and requires manual initiation

Two Related Problems, One Root Cause

1. Billing Reporting

Finance teams need to report Claude subscription spend alongside other SaaS tools (Cursor, Copilot, etc.). Without an API, this is a manual copy-paste from the billing UI every month.

Cursor exposes a `/teams/spend` endpoint that returns per-member spend:

{
  "spendCents": 1240,
  "fastPremiumRequests": 47,
  "name": "Jane Smith",
  "email": "[email protected]",
  "role": "member"
}

along with `subscriptionCycleStart`, `totalMembers`, and pagination. Claude needs the same.

2. User Lifecycle (Onboarding & Offboarding)

When employees join or leave, their Claude seats must be manually managed. There is no API to automate this — meaning offboarding depends on someone remembering to act on a person's last day. This is a real security and cost risk for any organisation with staff turnover.

SCIM is available on Enterprise but not Team. Organisations that don't need full Enterprise should still be able to automate seat management.

Requested Endpoints

GET /v1/organizations/subscription/invoices

Paginated invoice history (date, amount, status) — mirrors what's visible in the billing UI.

GET /v1/organizations/subscription/usage

Per-user spend/seat data for the current billing cycle:

  • `email`, `name`
  • `seat_type` (standard / premium)
  • `seat_cost_usd`, `extra_usage_cost_usd`, `total_cost_usd`
  • `conversation_count`
GET /v1/organizations/subscription/summary

Current cycle totals: seats purchased, seats active, projected total, next invoice date.

POST /v1/organizations/members
DELETE /v1/organizations/members/{user_id}

Programmatic seat provisioning and removal — enabling automated onboarding/offboarding via HR systems, AD lifecycle policies, or workflow tools (n8n, Zapier, etc.).

Why This Matters

  • Finance reporting: Claude spend is invisible to cost dashboards without an API
  • Security: Manual offboarding is error-prone — departed employees can retain access
  • Cost control: Unused seats can't be detected or reclaimed automatically
  • Parity: The API-side already has this infrastructure; the subscription side is the gap

The Admin API key (`sk-ant-admin`) infrastructure already exists — this is a data and action exposure gap, not an infrastructure gap.

Context

  • Organisation: 40-seat Team plan on claude.ai
  • Use cases: unified AI tooling spend dashboard + automated employee offboarding
  • Related: SCIM is Enterprise-only today; even a basic REST member add/remove on Team would unblock a significant operational gap

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature Request: Admin API for claude.ai subscription billing, reporting, and user lifecycle (Team/Enterprise)