List your profiles. An asterisk marks the active one. changedmanage-claude/admin-api
Nearest release: v2.1.333, published 4 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+64added
Lines−22removed
From line
8
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits32to this page, all time
The whole hunk
from line 8, old and new numbered
/
from line 8
88
99## Availability
1010
11The Admin API is available to Claude Console and Claude Enterprise organizations. It isn’t available to organizations on the claude.ai Team plan or to individual Console accounts. An individual Console account must first set up an organization on the [Organization](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) for where each organization type creates its key.
11The Admin API is available to Claude Console and Claude Enterprise organizations.
1212
13Claude Enterprise (claude.ai) organizations call the Admin API with a scoped API key created in claude.ai. From this page, only the members, invites, and [organization info](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) endpoints apply to them. Outside this page, they can also call the following APIs and endpoints:
13<Tip>
14 The Admin API isn’t available to organizations on the claude.ai Team plan, and an individual Claude Console account can’t create an Admin API key.
15</Tip>
1416
17If your company has a Claude Console organization, you can use the Admin API with that organization; see the [Admin API keys and tokens](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) page. An individual Console account must first set up an organization on the [Organization settings](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console.
18
19Claude Enterprise (claude.ai) organizations call the Admin API with an Enterprise Admin API key created in claude.ai. From this page, only the members, invites, and [organization info](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) endpoints apply to them. Outside this page, they can also call the following APIs and endpoints:
20
1521* The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which is in beta and takes a key with the `read:analytics` scope.
1622* Enterprise-only endpoints: groups, custom-role reads, and the [Spend Limits API](https://platform.claude.com/docs/en/manage-claude/spend-limits-api).
17* The [Plugins API](https://platform.claude.com/docs/en/manage-claude/plugins-api) and the [Claude Tag API](https://platform.claude.com/docs/en/manage-claude/claude-tag-api), which are Enterprise-only and in beta.
23* The [Plugins API](https://platform.claude.com/docs/en/manage-claude/plugins-api), the [Claude Tag API](https://platform.claude.com/docs/en/manage-claude/claude-tag-api), and the [Claude Code Managed Settings API](https://platform.claude.com/docs/en/api/beta/organization/claude_code/managed_settings), which are Enterprise-only and in beta.
1824
1925For members, invites, groups, and custom roles, see [User management](https://platform.claude.com/docs/en/manage-claude/user-management).
2026
from line 30
2430
2531The Admin API accepts any of these three credentials:
2632
27* An **Admin API key** (starting with `sk-ant-admin...`) sent in the `x-api-key` header. Only organization members with the admin role can provision one. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
28* An **OAuth bearer token** with the `org:admin` scope sent in the `authorization: Bearer` header. Only users and service accounts with the admin role can obtain one. See [Obtain an OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token).
29* A **personal key** or **service account key** that isn’t scoped to a specific workspace, sent in the `x-api-key` header. The key has the same permissions as the linked account. See [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types).
33* A **Console Admin API key** (starting with `sk-ant-admin...`) sent in the `x-api-key` header or the `authorization: Bearer` header. Only organization members with the admin role can provision one. See [Admin API keys and tokens](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
34* An **OAuth bearer token** with the `org:admin` scope, sent in the `authorization: Bearer` header. A user needs the admin role to obtain one. See [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token). For the role a service account needs, see [Permission boundaries](https://platform.claude.com/docs/en/manage-claude/wif-reference#permission-boundaries) on the Workload Identity Federation (WIF) reference page.
35* A **personal key** or **service account key** scoped to the organization, sent in the `x-api-key` header or the `authorization: Bearer` header. The key has the permissions of its linked account. See [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) on the Developer API keys page.
3036
31An Admin API key covers most endpoints. The service-account, federation-issuer, and federation-rule endpoints accept only an `org:admin` OAuth token. Send a personal key or service account key in the `x-api-key` header, as you would an Admin API key. The following examples call the [organization info endpoint](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) with an OAuth token and with an Admin API key.
37An Admin API key covers most endpoints, but the service-account, federation-issuer, and federation-rule endpoints accept only an `org:admin` OAuth token. The following examples call the [organization info endpoint](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) with an OAuth token and with an Admin API key.
3238
3339The SDK exposes the endpoints on this page under `client.organization` (csharp, go: `client.Organization`; java: `client.organization()`; php: `$client->organization`), and the `ant` CLI under `ant organization`. The examples on this page use the default client, which reads an Admin API key from `ANTHROPIC_API_KEY` or an OAuth bearer token from `ANTHROPIC_AUTH_TOKEN`. The comments in each list example say whether it fetches more pages or reads only the first. For each endpoint’s parameters and responses, see the [Admin API reference](https://platform.claude.com/docs/en/api/organization).
3440
3541### OAuth bearer token
3642
37Log in with the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) under a dedicated profile with the `org:admin` scope (see [Admin access](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication#admin-access)), then export the bearer token. `--profile admin` stores the `org:admin` credential under its own profile and makes it the CLI’s active profile. The exported variable applies to every SDK and CLI call in that shell. Use a shell you reserve for administration, unset the variable when you’re done, and switch the CLI back with `ant profile activate default`:
43You need the latest version of the `ant` CLI. To install it, see [Installation](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation) in the CLI quickstart.
3844
45Unlike a usual sign-in, which works in one workspace, an admin sign-in can make changes across your organization.
46
47The following commands change environment variables, so run them in a shell that you keep for administration. They list your profiles, unset `ANTHROPIC_API_KEY`, sign in under a separate profile with the `org:admin` scope, and export the token. The `--admin` flag in the `ant auth login` command adds the `org:admin` scope to the scopes that a sign-in already requests.
48
49The sign-in also makes the `admin` profile the CLI’s active profile. Your other shells use it too. Until you switch back, clients in those shells that use the active profile, such as the `ant` CLI, can run as an admin.
50
3951```bash CLI
40ant auth login --profile admin --scope "org:admin"
41export ANTHROPIC_AUTH_TOKEN=$(ant auth print-credentials --profile admin --access-token)
52# List your profiles. An asterisk marks the active one.
53# Note it, so that you can switch back later:
54ant profile list
55
56# Unset the API key variable.
57# While that variable is set, the SDK and the CLI use the key and not the token:
58unset ANTHROPIC_API_KEY
59
60ant auth login --profile admin --admin
61export ANTHROPIC_AUTH_TOKEN=$(ant auth print-credentials \
62 --profile admin --access-token)
4263```
4364
44Interactive tokens are short-lived. If requests start returning 401, rerun the `export` command to refresh the token.
65In this shell, the SDK and the `ant` CLI send the exported token on every call, whichever profile is active.
4566
46The SDK and the `ant` CLI read `ANTHROPIC_AUTH_TOKEN` automatically. Leave `ANTHROPIC_API_KEY` unset in the same shell so they send the bearer token. Automated workloads skip the login: they authenticate through Workload Identity Federation, and the SDK and CLI perform the token exchange from the federation environment variables. See [Bootstrap a workload to manage WIF](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#bootstrap-a-workload-to-manage-wif).
67For organization webhooks, sign in another way, as the [Sign in for organization webhooks](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#sign-in-for-organization-webhooks) section describes.
4768
4869Call the Admin API with the exported token:
4970
from line 146
125146 ```
126147</CodeGroup>
127148
128An `org:admin` token grants access to the whole organization, regardless of the workspace the underlying profile or [federation rule](https://platform.claude.com/docs/en/manage-claude/admin-api#federation-rules) is bound to.
149The token in `ANTHROPIC_AUTH_TOKEN` is short-lived, and nothing renews it there. When requests start to return 401, follow these steps:
129150
1511. Rerun the `export` command, which gets a new token if the old one has expired.
1522. If requests still return 401, sign in again with the same `ant auth login` command that you used, and rerun the `export` command.
153
154When you finish your admin work, undo what the sign-in commands changed. What to run for the active profile depends on whether you have a profile other than the one you signed in under:
155
156* **You have another profile:** Switch back to the profile that was active before you signed in. If it was `default`, run `ant profile activate default`.
157* **You have no other profile:** `ant auth logout --all` revokes the tokens on the server and removes every profile and credential. Run it so that the profile you signed in under doesn’t stay the active one.
158
159If you switched back, the profile you signed in under keeps its credential on disk. If you won’t need that credential for your next admin session, run `ant auth logout --profile` with the profile’s name, such as `admin`. That revokes its tokens on the server and deletes the credential.
160
161The `unset` and `export` commands changed environment variables only in the shell where you ran them. To undo them, do one of these:
162
163* Close that shell.
164* To keep using the shell, unset `ANTHROPIC_AUTH_TOKEN`, and set `ANTHROPIC_API_KEY` again if you use it.
165
130166For CI and other non-interactive workloads, mint the token with Workload Identity Federation instead of logging in interactively. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#workload-ci-and-automation).
131167
132168### Admin API key
133169
134To create an Admin API key for your organization type, see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
170To create an Admin API key for your organization type, see [Admin API keys and tokens](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
135171
136172<CodeGroup>
137173 ```bash cURL
from line 1402
13661402
13671403### API keys
13681404
1369Monitor and manage [API keys](https://platform.claude.com/docs/en/api/organization/api_keys/list). Each key in the response includes its `expires_at` timestamp (`null` for keys without an [expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)) and `principal`, the identity it acts as (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). For a personal key, `principal` is `{"type": "user_actor", "user_id": "user_..."}`. For a service account key, it is `{"type": "service_account_actor", "service_account_id": "svac_..."}`. For a workspace key, it is `null`. Each key also has a `scope` object: `{"type": "workspace", "workspace_id": "wrkspc_..."}` for a key bound to one workspace, or `{"type": "organization"}` for a key that can work across any workspace the account has access to. Filtering the list by `workspace_id` with the Default Workspace’s ID returns only keys bound to the Default Workspace; keys without a workspace scope aren’t returned under any `workspace_id` filter.
1405Monitor and manage [API keys](https://platform.claude.com/docs/en/api/organization/api_keys/list). Each key in the response includes these fields:
13701406
1407* `expires_at`: when the key expires. It’s `null` for a key without an expiration (see [Key expiration](https://platform.claude.com/docs/en/manage-claude/api-keys#key-expiration)).
1408* `principal`: the identity the key acts as (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). It’s `{"type": "user_actor", "user_id": "user_..."}` for a personal key, `{"type": "service_account_actor", "service_account_id": "svac_..."}` for a service account key, and `null` for a workspace key.
1409* `scope`: where the key can work. It’s `{"type": "workspace", "workspace_id": "wrkspc_..."}` for a key scoped to one workspace, and `{"type": "organization"}` for a key scoped to the organization, which can work in several workspaces.
1410
1411Filtering the list by `workspace_id` with the default workspace’s ID returns only keys scoped to the default workspace. A key scoped to the organization isn’t returned under any `workspace_id` filter. To list such keys, leave out `workspace_id`: the list then includes every Developer API key that your credential can list (see [Developer API keys](https://platform.claude.com/docs/en/manage-claude/api-keys)).
1412
13711413List the active API keys in a workspace:
13721414
13731415<CodeGroup>
from line 1686
16441686
16451687### Service accounts
16461688
1647Create and manage service accounts (`svac_...`), the non-human identities that [service account keys](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) and [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) tokens act as. These endpoints, like the federation-issuer and federation-rule endpoints, require an `org:admin` OAuth token. See [Service accounts in Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#service-accounts).
1689Create and manage service accounts (`svac_...`), the non-human identities that [service account keys](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) and [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) tokens act as. These endpoints, like the federation-issuer and federation-rule endpoints, require an `org:admin` OAuth token. See [Service accounts in Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#service-accounts).
16481690
16491691### Federation issuers
16501692
from line 1836
17941836* Handle errors from failed operations
17951837* Regularly audit member roles and permissions
17961838* Archive unused workspaces and delete pending invites you no longer need
1797* Monitor API key usage, audit each key’s [`expires_at`](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration), and rotate keys periodically
1839* Monitor API key usage, audit each key’s `expires_at` (see [Key expiration](https://platform.claude.com/docs/en/manage-claude/api-keys#key-expiration)), and rotate keys periodically
17981840
17991841## FAQ
18001842
18011843<AccordionGroup>
18021844 <Accordion title="What permissions are needed to use the Admin API?">
1803 The Admin API accepts an Admin API key (starting with `sk-ant-admin`), an OAuth bearer token with the `org:admin` scope, or a personal key or service account key that isn’t scoped to a specific workspace. Only organization members with the admin role can provision Admin API keys. Only users and service accounts with the admin role can obtain `org:admin` tokens. A personal key or service account key has the same permissions as the linked account. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
1845 In a Claude Console organization, you need the admin organization role to create a Console Admin API key or to sign in with the `org:admin` scope. For every credential the Admin API accepts and how roles apply to each one, see the [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) section. A Claude Enterprise organization uses an Enterprise Admin API key instead. See the [Admin API keys and tokens](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) page.
18041846 </Accordion>
18051847
18061848 <Accordion title="Can the Admin API create API keys?">
from line 1850
18081850 </Accordion>
18091851
18101852 <Accordion title="What happens to API keys when removing a user?">
1811 Behavior depends on the [key type](https://platform.claude.com/docs/en/manage-claude/authentication#key-types).
1853 Behavior depends on the [key type](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types).
18121854
18131855 Personal keys stop working when their user is removed from the organization. Service account keys stop working if their service account is archived, but continue to work even if the user that created them is removed. Workspace API keys continue to work. In the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace), each key is bound to the member who created it and stops working when that member is removed.
18141856 </Accordion>
No line in this hunk matches that.