Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261130T143719Z

71 pages moved out of 972 read.

Pages moved 71 significant first
Pages read 972 in this capture
Captured 14:37 UTC
Corpus hash e4d52e6f03fb corpus-hash

What this read moved

26-50 of 71, page 2 of 3

This capture is too large to show at once. Changes 26-50 of 71 are below, significant first; the rest are on the following screens.

manage-claude/compliance-errors Changed · +27 / -13 lines

from line 31
3131| ----- | ----- | ----- |
3232| [400 Bad Request](https://platform.claude.com/docs/en/manage-claude/compliance-errors#400-bad-request) | No | Fix the request, or enable the Compliance API if the message says it is not enabled, then resend. If `error.details.error_code` is `transcript_page_read_limit_exceeded` (the message says a page of a session’s transcript is too large to read), do not resend the same request; [Transcript page too large](https://platform.claude.com/docs/en/manage-claude/compliance-errors#transcript-page-too-large) says what to do instead. |
3333| [401 Unauthorized](https://platform.claude.com/docs/en/manage-claude/compliance-errors#401-unauthorized) | No | The key is not recognized, has been deactivated, or has expired; re-enable or replace it, then resend. |
34| [403 Forbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden) | No | Add the missing scope or use the right key type, then resend. |
34| [403 Forbidden](https://platform.claude.com/docs/en/manage-claude/compliance-errors#403-forbidden) | No | Create a key that carries the missing scope or use the right key type, then resend. |
3535| [404 Not Found](https://platform.claude.com/docs/en/manage-claude/compliance-errors#404-not-found) | Usually no | A message that names a resource means it was deleted or never existed; remove it from your queue. The bare message `Not found` means the request did not authenticate (or the path does not exist), not that a resource is gone; see [Request not authenticated](https://platform.claude.com/docs/en/manage-claude/compliance-errors#request-not-authenticated). On the Security posture endpoint, a bare `Not found` does not mean that the request did not authenticate; the [Security posture results reference](https://platform.claude.com/docs/en/manage-claude/compliance-security-posture/results-reference#handle-errors) lists its causes. The session endpoints add two more cases: on the local session endpoints, the message `Local sessions are not available.` (returned on every call, including the list) means the endpoints are currently unavailable to your parent organization, not that a session is gone; keep your queued IDs and see [Local session not found](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-session-not-found). A remote session still in `pending` status 404s on its messages endpoint until it starts; see [Remote session not found](https://platform.claude.com/docs/en/manage-claude/compliance-errors#remote-session-not-found). |
3636| [409 Conflict](https://platform.claude.com/docs/en/manage-claude/compliance-errors#409-conflict) | No | The request conflicts with the resource’s current state; resolve the conflict (such as detaching child resources), then retry. |
3737| [429 Too Many Requests](https://platform.claude.com/docs/en/manage-claude/compliance-errors#429-too-many-requests) | Yes, after `retry-after` | Wait the seconds in `retry-after`, then retry; do not advance your cursor. |
from line 188
188188API key has expired.
189189```
190190 
191**Cause:** `API key is invalid.` means the value sent does not match a usable key, for example because it was truncated or altered when it was stored. `API key has been deactivated.` means the key has been disabled or deleted. `API key has expired.` means an Admin API key’s expiration date has passed; Compliance Access Keys are not created with one.
191**Cause:** `API key is invalid.` means the value sent does not match a usable key, for example because it was truncated or altered when it was stored. `API key has been deactivated.` means the key has been disabled or deleted. `API key has expired.` means a Console Admin API key’s expiration date has passed; Compliance Access Keys are not created with one.
192192 
193**Fix:** For `API key is invalid.`, compare the value your client sends against the secret you stored when the key was created; the full secret is displayed only once, so if your stored copy is wrong, create a new key. For `API key has been deactivated.`, re-enable the key if it was only disabled, in [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access) for a Compliance Access Key or on the [Admin keys](https://platform.claude.com/settings/admin-keys) page (`platform.claude.com/settings/admin-keys`) in the Claude Console for an Admin API key; a deleted key cannot be restored. For a deleted or expired key, create a new key and update your integration to use it, as described in [Manage and rotate keys](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#manage-and-rotate-keys).
193**Fix:** Handle each message as follows:
194194 
195* For `API key is invalid.`, compare the value your client sends with the secret you stored when you created the key. The full secret is shown only once, so if your stored copy is wrong, create a new key.
196* For `API key has been deactivated.`, re-enable the key if it was only disabled. Re-enable a Compliance Access Key on the [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**). Re-enable a Console Admin API key on the [Admin keys](https://platform.claude.com/settings/admin-keys) page (`platform.claude.com/settings/admin-keys`) in the Claude Console. A deleted key cannot be restored, so create a new key.
197* For `API key has expired.`, create a new key.
198 
199To switch your integration to a new key, see [Manage and rotate keys](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#manage-and-rotate-keys).
200 
195201## 403 Forbidden
196202 
197The key in `x-api-key` is valid but does not carry a scope the endpoint accepts. The verbatim message lists the scopes the key carries (`Got:`) and the scopes the endpoint accepts (`Needed one of:` on read endpoints, where any one listed scope is sufficient, or `Needed:` on delete endpoints), so you can confirm what the key carries without rechecking Claude Console or claude.ai. On read endpoints, the accepted list also includes `read:org_audit`, a read-only audit scope that covers every Compliance API read endpoint; see [Choose scopes for a Claude Enterprise key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#choose-scopes-for-a-claude-enterprise-key). Compliance Access Key scopes are immutable after creation, so each insufficient-scope fix directs you to create a new key rather than edit the existing one.
203The key in `x-api-key` is valid but does not carry a scope the endpoint accepts. The verbatim message shows the key’s scopes and the scopes the endpoint accepts, so you can check them without opening the Claude Console or claude.ai:
198204 
199A standalone Claude Console organization (one with no parent organization) cannot create a Compliance Access Key, so fixes that require one do not apply to it; it can query the Activity Feed. An Admin API key that you create while the [Safety Cases API](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access) is available to your organization also reaches that API. Any other Admin API key gets a 403 error from that API. If that API is available to your organization, create another [Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key).
205* **`Got:`** The key carries these scopes.
206* **`Needed one of:`** A read endpoint accepts any one of these scopes.
207* **`Needed:`** A delete endpoint requires this scope.
200208 
209On a read endpoint, the `Needed one of:` list also includes `read:org_audit`. This read-only audit scope covers every Compliance API read endpoint (see [Enterprise Admin API key scopes](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#across-several-apis)).
210 
211A Compliance Access Key’s scopes can’t change after it’s created. To add a scope, create a new key.
212 
213A standalone Claude Console organization is one with no parent organization. It cannot create a Compliance Access Key, so fixes that require one do not apply to it. With a Console Admin API key created while the Compliance API was enabled, it can query the Activity Feed. A Console Admin API key that you create while the [Safety Cases API](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access) is available to your organization also reaches that API. Any other Console Admin API key gets a 403 error from that API. If that API is available to your organization, create another [Console Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key).
214 
201215### Insufficient scope: Activity Feed
202216 
203217**Type:** `permission_error`
from line 238
224238**Cause:** A key without `read:compliance_org_data` was used to call an organizations, roles, groups, or effective-settings endpoint, or the Security posture endpoint. There are two common paths to this error:
225239 
226240* A Compliance Access Key (`sk-ant-api01-...`) was created without the `read:compliance_org_data` scope.
227* A Claude Console Admin API key (`sk-ant-admin01-...`) was used. Admin API keys cannot read organization metadata.
241* A Console Admin API key (`sk-ant-admin01-...`) was used. A key created on the [Admin keys](https://platform.claude.com/settings/admin-keys) page in the Claude Console can’t hold `read:compliance_org_data`, so it can’t read organization metadata.
228242 
229**Fix:** [Create a new Compliance Access Key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) with `read:compliance_org_data` selected. Admin API keys cannot read organization metadata; the Compliance Access Key is required.
243**Fix:** [Create a new Compliance Access Key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) with `read:compliance_org_data` selected.
230244 
231245### Retired scope: organization settings
232246 
from line 262
248262Missing required scopes. Got: ['read:compliance_activities'] Needed one of: ['read:compliance_user_data', 'read:org_audit']
249263```
250264 
251**Cause:** A key without `read:compliance_user_data` was used to call a chats, messages, files, projects, sessions, organization users, or group-members endpoint. There are two common paths to this error:
265**Cause:** A key without `read:compliance_user_data` was used to call a chats, messages, files, artifacts, projects, sessions, organization users, user preferences, or group-members endpoint. There are two common paths to this error:
252266 
253267* A Compliance Access Key (`sk-ant-api01-...`) was created without the `read:compliance_user_data` scope.
254* A Claude Console Admin API key (`sk-ant-admin01-...`) was used. Admin API keys carry only `read:compliance_activities` and cannot be granted `read:compliance_user_data`, so they cannot call the chat, file, project, project attachment, session, user, or group-member endpoints. The exception is the scopes of the [Safety Cases API](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access): an Admin API key that you create while that API is available to your organization also carries them.
268* A Console Admin API key (`sk-ant-admin01-...`) was used. A key created on the [Admin keys](https://platform.claude.com/settings/admin-keys) page in the Claude Console can’t hold `read:compliance_user_data`.
255269 
256270**Fix:** Use a [Compliance Access Key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) created in claude.ai with `read:compliance_user_data` selected. If the request really should be Activity Feed only, point the Admin API key at `GET /v1/compliance/activities` instead.
257271 
from line 277
263277Missing required scopes. Got: ['read:compliance_user_data'] Needed: ['delete:compliance_user_data']
264278```
265279 
266**Cause:** A Compliance Access Key without `delete:compliance_user_data` was used to call a `DELETE` endpoint on chats, files, or projects.
280**Cause:** A Compliance Access Key without `delete:compliance_user_data` was used to call a `DELETE` endpoint on chats, files, projects, or code artifacts.
267281 
268282**Fix:** [Create a new Compliance Access Key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) with `delete:compliance_user_data` selected. The delete scope is separate from `read:compliance_user_data` so that read-only audit keys cannot delete content.
269283 

manage-claude/compliance-org-data Changed · +14 / -10 lines

from line 35
3535 {
3636 "uuid": "91012d09-e48b-438e-a489-1bebfd8fa6f9",
3737 "name": "Acme Engineering",
38 "created_at": "2025-06-01T10:00:00Z"
38 "created_at": "2025-06-01T10:00:00Z",
39 "organization_type": "claude_enterprise"
3940 },
4041 {
4142 "uuid": "5a1b2c3d-4e5f-6789-abcd-ef0123456789",
42 "name": "Acme Legal",
43 "created_at": "2025-07-15T14:30:00Z"
43 "name": "Acme API",
44 "created_at": "2025-07-15T14:30:00Z",
45 "organization_type": "claude_platform"
4446 }
4547 ],
4648 "has_more": false,
from line 50
4850}
4951```
5052 
53The `organization_type` field gives the kind of organization: `claude_enterprise` for a claude.ai organization on the Enterprise plan, `claude_team` for a claude.ai organization on the Team plan, or `claude_platform` for a Claude Console organization. It is `null` for an organization of any other kind, such as a claude.ai organization on another plan. Anthropic can add values, so treat a value you don’t recognize as you would `null`.
54 
5155The `uuid` field is the canonical identifier for downstream lookups. The following table maps it to the other organization identifiers across the Compliance API:
5256 
5357| Field | Where | Relationship to `uuid` |
from line 237
233237* An unknown organization
234238* An organization ID that is not a valid UUID
235239* An organization outside your parent’s tree
236* A parent organization that does not yet have access to this endpoint
240* A parent organization that does not have access to this endpoint
237241 
238242A 404 therefore does not reveal whether an organization exists. The settings endpoint is enabled per parent organization separately from the rest of the Compliance API; if every request returns 404, contact your Anthropic representative.
239243 

manage-claude/enterprise-admin-api-key-scopes New page · 128 lines, new page

## Who can select which scopes ## Scopes by API ### Admin API user management ### Admin API project tags ### Plugins API ### Claude Tag API ### Claude Code Managed Settings API ### Spend Limits API ### Analytics APIs ### Compliance API ### Across several APIs ## Scopes that work together or have limits ## Which organizations a key reaches

A whole new page. There's nothing to diff it against, so here is what it says.

---
title: Enterprise Admin API key scopes
url: https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes
description: See what Enterprise Admin API key scopes allow, who can select them, and which organizations a key reaches.
---

This page lists scopes that an [Enterprise Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) can hold, what each one allows, and who can select it.

## Who can select which scopes

* **[Primary owner](https://platform.claude.com/docs/en/manage-claude/user-management#organization-roles):** They can select any scope.
* **Organization owner:** They can select only Compliance API scopes and only on a key for their own organization. For anything else, they need to ask the primary owner.

## Scopes by API

### Admin API user management

* `read:members`: List and look up members and invites; read roles and their permissions.
* `write:members`: Change member roles, remove members, [sign members out everywhere](https://platform.claude.com/docs/en/manage-claude/user-management#sign-a-member-out-everywhere) (in beta), and create and withdraw invites.
* `read:rbac_groups`: Read groups and their members.
* `write:rbac_groups`: Create, rename, and delete groups; add and remove group members.

For the endpoints these scopes cover, see [User management](https://platform.claude.com/docs/en/manage-claude/user-management).

### Admin API project tags

* `read:project_tags`: Read your organization’s tags, each tag’s list of values, and the tags set on each project.
* `write:project_tags`: Add values to a tag’s list; set or remove the tags on each project.

Both scopes act on every project in your organization, private projects included.

Project tags are in beta. The Claude Help Center’s [Track spend by cost code with project tags](https://support.claude.com/en/articles/18251257-track-spend-by-cost-code-with-project-tags) article says which organizations can use them. It also says how to set tags through the Admin API.

### Plugins API

* `read:plugins`: Read plugins and their settings, and download plugin files.
* `write:plugins`: Upload plugins and versions, choose which version members are served, delete plugins (members’ personal plugins included), and change installation settings.

For more on what each scope allows and which organizations it reads, see [Plugins API scopes](https://platform.claude.com/docs/en/manage-claude/plugins-api#scopes).

### Claude Tag API

Claude Tag is Claude working as a teammate in Slack. An Access bundle is a named set of access, such as connectors and repositories, that Claude can use in a Slack channel or workspace.

* `read:claude_tag`: Read Claude Tag’s Slack settings and Access bundles.
* `write:claude_tag`: Set up and remove channels, change settings, change Access bundles’ instructions, and attach and detach Access bundles.

For the endpoints these scopes cover, see [Claude Tag API](https://platform.claude.com/docs/en/manage-claude/claude-tag-api).

### Claude Code Managed Settings API

* `read:claude_code_managed_settings`: Read these settings:

  * Whether Claude Code managed settings apply organization-wide or by group, and the group order
  * Each group’s settings
  * The default settings for everyone else

* `write:claude_code_managed_settings`: Make these changes:

  * Change whether Claude Code managed settings apply organization-wide or by group, and change the group order
  * Create, replace, and delete each group’s settings
  * Set, replace, and clear the default settings

The [Claude Code Managed Settings API](https://platform.claude.com/docs/en/api/beta/organization/claude_code/managed_settings) is in beta. These scopes act only on the organization you create the key in.

### Spend Limits API

* `read:spend_limits`: Read the spend limit that applies to each member; read members’ increase requests.
* `write:spend_limits`: Set or clear per-user spend limits; approve or deny increase requests.

For the endpoints these scopes cover, see [Spend Limits API](https://platform.claude.com/docs/en/manage-claude/spend-limits-api).

### Analytics APIs

* `read:analytics`: Read reports through these APIs:

  * Engagement, adoption, cost, and usage reports through the [Claude Enterprise Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api)
  * Token usage and cost reports through the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api)

### Compliance API

* `read:compliance_activities`: Read the [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed).

* `read:compliance_user_data`: Read these records:

  * [Chats, files, projects, and artifacts](https://platform.claude.com/docs/en/manage-claude/compliance-content-data)
  * [Session transcripts](https://platform.claude.com/docs/en/manage-claude/compliance-sessions)
  * [Organization users](https://platform.claude.com/docs/en/manage-claude/compliance-org-data#list-organization-users)
  * [User preferences](https://platform.claude.com/docs/en/manage-claude/compliance-org-data#list-user-preferences) (in beta)
  * [Group members](https://platform.claude.com/docs/en/manage-claude/compliance-org-data#list-groups-and-members)

* `delete:compliance_user_data`: Delete chats, files, projects, project documents, and code artifacts, such as Claude Docs documents. Deleting a chat deletes its other artifacts, but not its code artifacts. See [Content that remains after a delete](https://platform.claude.com/docs/en/manage-claude/compliance-content-data#content-that-remains-after-a-delete) on the Retrieve and delete chats, files, and projects page.

* `read:compliance_org_data`: Read these records and call these endpoints:

  * [Organization metadata](https://platform.claude.com/docs/en/manage-claude/compliance-org-data): names, types, roles, and groups
  * Effective settings
  * [Security posture](https://platform.claude.com/docs/en/manage-claude/compliance-security-posture/results-reference)
  * Every Plugins API `GET` endpoint

For the endpoints these scopes cover, see [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api).

### Across several APIs

* `read:org_audit`: Call these endpoints:

  * Every read endpoint of Admin API user management
  * Every read endpoint of the Compliance API
  * Every Plugins API `GET` endpoint

Where the Compliance API is enabled, this scope reads members’ chats, files, projects, artifacts, and session transcripts.

`read:org_audit` is read-only and meant for security audits. It doesn’t cover the other APIs on this page, such as the Spend Limits API or the analytics APIs.

## Scopes that work together or have limits

* **Scopes from several APIs:** One key can hold scopes from several APIs, such as `read:analytics` and `read:spend_limits`. A key set to **All organizations** can hold only Compliance API, group, and audit scopes. See [Key access](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#key-access) on the Admin API keys and tokens page.
* **Write and delete scopes:** The write and delete scopes on this page don’t cover read endpoints. To call those too, also select the read scope, such as `read:plugins` with `write:plugins`.
* **The `managed` role:** To assign the [`managed` role](https://platform.claude.com/docs/en/manage-claude/user-management#organization-roles) on a role change or an invite, select both `write:members` and `write:rbac_groups`. The same pair assigns groups on an invite.
* **Security posture attestations:** With `read:org_audit` or with both `read:compliance_user_data` and `read:compliance_org_data`, a key also reads who made a [Security posture attestation](https://platform.claude.com/docs/en/manage-claude/compliance-security-posture/results-reference#who-attested-and-comments) where the endpoint returns it for the organization.

## Which organizations a key reaches

Most scopes act only on the organization you create the key in. A Claude Enterprise organization normally belongs to a [parent organization](https://platform.claude.com/docs/en/manage-claude/administering-claude#which-organization-you-have), which can hold several linked organizations. Keys with Compliance API, group, or audit scopes can reach further:

* **Compliance API scopes:** These reach all linked organizations when you select **All organizations** under [Key access](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#key-access), which the Admin API keys and tokens page describes.
* **Group scopes (`read:rbac_groups` and `write:rbac_groups`):** These scopes act on groups. Groups belong to the parent organization, and its linked organizations share them. For which keys can hold these scopes, see [Groups and roles](https://platform.claude.com/docs/en/manage-claude/user-management#groups-and-roles) on the User management page.
* **Audit scope (`read:org_audit`):** The primary owner can create a key with this scope for all linked organizations. That key can then read the Compliance API of every linked organization and the Plugins API of any that has access to it. See [Reading another organization under the same parent](https://platform.claude.com/docs/en/manage-claude/plugins-api#reading-another-organization-under-the-same-parent) on the Plugins API page.

manage-claude/enterprise-frontier-safeguards/external-storage Changed · +9 / -9 lines

from line 71
7171 Every request on this page sends `anthropic-version: 2026-10-21` and `anthropic-beta: efs-2026-10-01`. Send one of these credentials with each request:
7272 
7373 * **An OAuth bearer token with the `org:admin` scope:** Every request on this page takes one in the `authorization: Bearer` header. To get one, see [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token). The examples read it from `$ANTHROPIC_AUTH_TOKEN`. The token is short-lived: if a request returns a 401 error, get a new one.
74 * **A personal key or service account key:** Every request on this page takes one in `x-api-key`. Use a key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). The Admin API refuses a key that’s scoped to a workspace, even for requests on that workspace.
74 * **A personal key or service account key:** Every request on this page takes one in `x-api-key`. Use a key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). The Admin API refuses a key that’s scoped to a workspace, even for requests on that workspace.
7575 * **An Admin API key:** It can’t attach or detach storage: those requests return a permission error. The External Storage requests take one in `x-api-key`. To get one, see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
7676 
7777 For a token or a personal or service account key, the account must have the admin role. To use a key, replace the `authorization` header in each example with `x-api-key: $ANTHROPIC_API_KEY`.
from line 78
7878 </Tab>
7979 
8080 <Tab title="CLI">
81 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
81 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
8282 
8383 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the `ant` CLI sends the key. The token is short-lived: if a request returns a 401 error, get a new one. Leave `ANTHROPIC_WORKSPACE_ID` unset: with it set, a key gets a 400 error on these requests.
8484 
from line 88
8888 </Tab>
8989 
9090 <Tab title="Python">
91 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
91 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
9292 
9393 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
9494 
from line 98
9898 </Tab>
9999 
100100 <Tab title="TypeScript">
101 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
101 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
102102 
103103 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
104104 
from line 108
108108 </Tab>
109109 
110110 <Tab title="C#">
111 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
111 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
112112 
113113 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
114114 
from line 118
118118 </Tab>
119119 
120120 <Tab title="Go">
121 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
121 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
122122 
123123 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
124124 
from line 128
128128 </Tab>
129129 
130130 <Tab title="Java">
131 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
131 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
132132 
133133 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
134134 
from line 138
138138 </Tab>
139139 
140140 <Tab title="PHP">
141 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
141 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
142142 
143143 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
144144 
from line 148
148148 </Tab>
149149 
150150 <Tab title="Ruby">
151 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
151 Use one credential for every request on this page. Use an [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope. Or use a personal key or service account key that isn’t scoped to a workspace (see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types)). Either way, the account must have the admin role. Don’t use an Admin API key: it can’t attach or detach storage.
152152 
153153 Set `ANTHROPIC_AUTH_TOKEN` to the token or `ANTHROPIC_API_KEY` to the key. Set only one: with both set, the SDK sends the key. The token is short-lived: if a request returns a 401 error, get a new one.
154154 

manage-claude/enterprise-frontier-safeguards/safety-cases-api Changed · +416 / -80 lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 15
1515To get access to the Safety Cases API:
1616 
17171. **Turn on the Compliance API.** You must have it on for your organization. If it’s off, see [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) to turn it on.
182. **Create an Admin API key.** As an organization admin, create an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) in the Claude Console. There are no scopes to select. An Admin API key gets access to the Safety Cases API only if you create it while the API is available to your organization. An Admin API key that you created earlier never gains this access. If you turn the Compliance API off, the Safety Cases API refuses your key’s requests with a 400 error.
182. **Create a Console Admin API key.** As an organization admin, [create the key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) in the Claude Console. There are no scopes to select. The key gets access to the Safety Cases API only if you create it while the API is available to your organization. A Console Admin API key that you created earlier never gains this access. If you turn the Compliance API off, the Safety Cases API refuses your key’s requests with a 400 error.
1919 
2020To test the key, [list your Safety Cases](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#poll) with it:
2121 
2222| Response | What it means and what to do |
2323| ----- | ----- |
2424| 200, even with an empty list | Your key can list Safety Cases. You get Safety Cases only for workspaces without Anthropic Human Review. |
25| 401, 403, or 404 | Your key can’t list Safety Cases. Check that you sent the whole key, then create another Admin API key and try again. |
25| 401, 403, or 404 | Your key can’t list Safety Cases. Check that you sent the whole key, then create another Console Admin API key and try again. |
2626| 403 or 404 with the new key | The API isn’t available to your organization. |
2727 
28Delete any Admin API keys that you don’t need.
29 
30The key reaches only its own organization’s Safety Cases and messages, even under a parent organization. It’s a full Admin API key. While the API is available to your organization, every Admin API key that you create gets this access. For that reason, limit who can create and hold these keys. A test organization’s keys don’t get this access.
28Delete any Console Admin API keys that you don’t need.
29 
30The key reaches only its own organization’s Safety Cases and messages, even under a parent organization. It’s a full Console Admin API key. While the API is available to your organization, every Console Admin API key that you create gets this access. For that reason, limit who can create and hold these keys. A test organization’s keys don’t get this access.
3131 
3232The key gets all three of the following scopes:
3333 
from line 39
3939 
4040Other keys can also read this data:
4141 
42* **Safety Cases and Safety Notices:** Where the API is available, keys with [`read:org_audit`](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#choose-scopes-for-a-claude-enterprise-key) can read only their own organization’s Safety Cases and Safety Notices. They can do this only if that organization has a parent organization.
42* **Safety Cases and Safety Notices:** Where the API is available, keys with [`read:org_audit`](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#across-several-apis) can read only their own organization’s Safety Cases and Safety Notices. They can do this only if that organization has a parent organization.
4343* **Flagged messages:** In some organizations, keys with `read:org_audit` can also read the flagged messages, and so can keys with `read:compliance_user_data`. Some of these keys reach the flagged messages of every organization under their parent organization.
4444 
4545Send the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header on every request. A request without it can return a 400 error. After a 429 or 503 error, retry the request later.
from line 50
5050 
5151On your first run, leave `updated_at[gte]` out. Then, store the largest `updated_at` you have read, and send it as `updated_at[gte]` on the next run:
5252 
53```bash cURL
54curl --fail-with-body -sS -G \
55 "https://api.anthropic.com/v1/compliance/review/cases" \
56 --data-urlencode "updated_at[gte]=2026-11-23T18:15:34Z" \
57 -d "order_by=updated_at" \
58 -d "order=asc" \
59 -d "limit=100" \
60 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
61 -H "anthropic-version: 2026-10-21"
62```
53<CodeGroup>
54 ```bash cURL
55 curl --fail-with-body -sS -G \
56 "https://api.anthropic.com/v1/compliance/review/cases" \
57 --data-urlencode "updated_at[gte]=2026-11-23T18:15:34Z" \
58 -d "order_by=updated_at" \
59 -d "order=asc" \
60 -d "limit=100" \
61 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
62 -H "anthropic-version: 2026-10-21"
63 ```
64 
65 ```bash CLI
66 # Fetches more pages as needed, so `--limit` sets the page size, not the total.
67 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases list \
68 --updated-at-gte 2026-11-23T18:15:34Z \
69 --order-by updated_at \
70 --order asc \
71 --limit 100
72 ```
73 
74 ```python Python
75 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
76 
77 cases = client.beta.compliance.review.cases.list(
78 updated_at_gte="2026-11-23T18:15:34Z",
79 order_by="updated_at",
80 order="asc",
81 limit=100,
82 )
83 
84 # Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
85 for case in cases:
86 print(case.id, case.status.type, case.updated_at)
87 ```
88 
89 ```typescript TypeScript
90 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
91 
92 const cases = await client.beta.compliance.review.cases.list({
93 "updated_at[gte]": "2026-11-23T18:15:34Z",
94 order_by: "updated_at",
95 order: "asc",
96 limit: 100
97 });
98 
99 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
100 for await (const reviewCase of cases) {
101 console.log(reviewCase.id, reviewCase.status.type, reviewCase.updated_at);
102 }
103 ```
104 
105 ```csharp C#
106 using Anthropic.Models.Beta.Compliance.Review;
107 using Anthropic.Models.Beta.Compliance.Review.Cases;
108 
109 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
110 
111 var page = await client.Beta.Compliance.Review.Cases.List(
112 new()
113 {
114 UpdatedAtGte = DateTimeOffset.Parse("2026-11-23T18:15:34Z"),
115 OrderBy = BetaComplianceReviewCaseOrderBy.UpdatedAt,
116 Order = BetaComplianceReviewOrder.Asc,
117 Limit = 100,
118 }
119 );
120 
121 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
122 await foreach (var reviewCase in page.Paginate())
123 {
124 Console.WriteLine($"{reviewCase.ID} {reviewCase.Status.Type.Raw()} {reviewCase.UpdatedAt}");
125 }
126 ```
127 
128 ```go Go
129 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
130 
131 cases := client.Beta.Compliance.Review.Cases.ListAutoPaging(
132 context.Background(),
133 anthropic.BetaComplianceReviewCaseListParams{
134 UpdatedAtGte: anthropic.Time(time.Date(2026, time.November, 23, 18, 15, 34, 0, time.UTC)),
135 OrderBy: anthropic.BetaComplianceReviewCaseOrderByUpdatedAt,
136 Order: anthropic.BetaComplianceReviewOrderAsc,
137 Limit: anthropic.Int(100),
138 },
139 )
140 
141 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
142 for cases.Next() {
143 reviewCase := cases.Current()
144 fmt.Println(reviewCase.ID, reviewCase.Status.Type, reviewCase.UpdatedAt)
145 }
146 if err := cases.Err(); err != nil {
147 log.Fatal(err)
148 }
149 ```
150 
151 ```java Java
152 import com.anthropic.models.beta.compliance.review.BetaComplianceReviewOrder;
153 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewCaseOrderBy;
154 import com.anthropic.models.beta.compliance.review.cases.CaseListParams;
155 import java.time.OffsetDateTime;
156 
157 void main() {
158 AnthropicClient client = AnthropicOkHttpClient.builder()
159 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
160 .build();
161 
162 var params = CaseListParams.builder()
163 .updatedAtGte(OffsetDateTime.parse("2026-11-23T18:15:34Z"))
164 .orderBy(BetaComplianceReviewCaseOrderBy.UPDATED_AT)
165 .order(BetaComplianceReviewOrder.ASC)
166 .limit(100)
167 .build();
168 var cases = client.beta().compliance().review().cases().list(params);
169 
170 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
171 for (var reviewCase : cases.autoPager()) {
172 IO.println(reviewCase.id() + " " + reviewCase.status().type() + " " + reviewCase.updatedAt());
173 }
174 }
175 ```
176 
177 ```php PHP
178 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
179 
180 $cases = $client->beta->compliance->review->cases->list(
181 updatedAtGte: new \DateTimeImmutable('2026-11-23T18:15:34Z'),
182 orderBy: 'updated_at',
183 order: 'asc',
184 limit: 100,
185 );
186 
187 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
188 foreach ($cases->pagingEachItem() as $case) {
189 echo $case->id, ' ', $case->status->type, ' ', $case->updatedAt->format(\DateTimeInterface::ATOM), PHP_EOL;
190 }
191 ```
192 
193 ```ruby Ruby
194 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
195 
196 cases = client.beta.compliance.review.cases.list(
197 updated_at_gte: Time.utc(2026, 11, 23, 18, 15, 34),
198 order_by: :updated_at,
199 order: :asc,
200 limit: 100
201 )
202 
203 # Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
204 cases.auto_paging_each do |review_case|
205 puts "#{review_case.id} #{review_case.status.type} #{review_case.updated_at}"
206 end
207 ```
208</CodeGroup>
63209 
64210```json Response
65211{
from line 308
162308 
163309Fetch each `item_id` in `transcripts`. Whether you can read a message that you sent with a user profile depends on the key:
164310 
165* **An Admin API key from the Claude Console** can’t read such a message. That request returns a 404 error. Anthropic writes the message’s [Transcript](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-case-files#transcript) to the workspace’s Case bucket, if it has one.
166* **Other keys** can read such a message in some organizations (see [Get access](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access)). With such a key, send the user profile’s ID in the `anthropic-user-profile-id` header. For any other message, leave the header out. A wrong or missing ID returns a 404 error, and so does an ID on a message that you sent with no user profile.
167 
168```bash cURL
169curl --fail-with-body -sS \
170 "https://api.anthropic.com/v1/compliance/safeguards/items/msg_01XFDUDYJgAACzvnptvVoYEL" \
171 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
172 -H "anthropic-version: 2026-10-21"
173```
311* **A Console Admin API key** can’t read such a message. That request returns a 404 error. Anthropic writes the message’s [Transcript](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-case-files#transcript) to the workspace’s Case bucket, if it has one.
312* **Other keys** can read such a message in some organizations (see [Get access](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access)). With such a key, send the user profile’s ID in the `anthropic-user-profile-id` header. For any other message, leave the header out. A missing ID or another user profile’s ID returns a 404 error, and so does an ID on a message that you sent with no user profile.
313 
314<CodeGroup>
315 ```bash cURL
316 curl --fail-with-body -sS \
317 "https://api.anthropic.com/v1/compliance/review/items/msg_01XFDUDYJgAACzvnptvVoYEL" \
318 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
319 -H "anthropic-version: 2026-10-21"
320 ```
321 
322 ```bash CLI
323 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:items retrieve \
324 --item-id msg_01XFDUDYJgAACzvnptvVoYEL
325 ```
326 
327 ```python Python
328 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
329 
330 item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")
331 
332 print(item.to_json())
333 ```
334 
335 ```typescript TypeScript
336 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
337 
338 const item = await client.beta.compliance.review.items.retrieve(
339 "msg_01XFDUDYJgAACzvnptvVoYEL"
340 );
341 
342 console.log(JSON.stringify(item, null, 2));
343 ```
344 
345 ```csharp C#
346 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
347 
348 var item = await client.Beta.Compliance.Review.Items.Retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");
349 
350 Console.WriteLine(item);
351 ```
352 
353 ```go Go
354 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
355 
356 item, err := client.Beta.Compliance.Review.Items.Get(
357 context.Background(),
358 "msg_01XFDUDYJgAACzvnptvVoYEL",
359 anthropic.BetaComplianceReviewItemGetParams{},
360 )
361 if err != nil {
362 log.Fatal(err)
363 }
364 
365 fmt.Println(item.RawJSON())
366 ```
367 
368 ```java Java
369 AnthropicClient client = AnthropicOkHttpClient.builder()
370 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
371 .build();
372 
373 var item = client.beta().compliance().review().items().retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");
374 
375 IO.println(item);
376 ```
377 
378 ```php PHP
379 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
380 
381 $item = $client->beta->compliance->review->items->retrieve('msg_01XFDUDYJgAACzvnptvVoYEL');
382 
383 echo json_encode($item, JSON_PRETTY_PRINT), PHP_EOL;
384 ```
385 
386 ```ruby Ruby
387 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
388 
389 item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")
390 
391 puts item.to_json
392 ```
393</CodeGroup>
174394 
175395The response holds the message and the sender that Anthropic recorded:
176396 
177397```json Response
178398{
179 "type": "compliance_safeguards_review_item",
399 "type": "compliance_review_item",
180400 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
181 "organization_uuid": "abcdef01-2345-6789-abcd-ef0123456789",
182 "sampled_at": "2026-11-23T17:58:12.482913Z",
401 "organization_id": "abcdef01-2345-6789-abcd-ef0123456789",
402 "created_at": "2026-11-23T17:58:12.482913Z",
183403 "content_expires_at": "2026-12-21T17:58:12.482913Z",
184 "product_surface": "api",
185 "model": "claude-opus-5-5",
186404 "workspace_id": "wrkspc_01AbCdEfGhJkLmNpQrStUvWx",
187 "api_key_id": null,
188 "user": { "id": "user_01JkWm4Rt7YpXc2NvBq9sZdH", "email_address": "[email protected]" },
405 "actor": {
406 "type": "user_actor",
407 "user_id": "user_01JkWm4Rt7YpXc2NvBq9sZdH",
408 "email_address": "[email protected]"
409 },
189410 "user_profile_id": null,
190 "refs": {
191 "batch_id": null,
192 "local_session_id": null,
193 "claude_chat_id": null,
194 "claude_chat_message_id": null,
195 "remote_session_id": null,
196 "remote_session_event_id": null,
197 "agent_session_id": null
198 },
199 "content": {
200 "request": {
201 "model": "claude-opus-5-5",
202 "max_tokens": 1024,
203 "messages": [{ "role": "user", "content": "Hello, Claude" }]
411 "read_reason": { "type": "safeguards_review" },
412 "details": {
413 "type": "message",
414 "model": "claude-opus-5-5",
415 "content": {
416 "type": "create_message",
417 "request": {
418 "model": "claude-opus-5-5",
419 "max_tokens": 1024,
420 "messages": [{ "role": "user", "content": "Hello, Claude" }]
421 },
422 "response": {
423 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
424 "type": "message",
425 "role": "assistant",
426 "content": [{ "type": "text", "text": "Hello! How can I help you today?" }]
427 }
204428 },
205 "response": {
206 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
207 "type": "message",
208 "role": "assistant",
209 "content": [{ "type": "text", "text": "Hello! How can I help you today?" }]
210 }
211 },
212 "content_unavailable_reason": null
429 "content_unavailable_reason": null
430 }
213431}
214432```
215433 
216`content` holds the stored request and response. It’s not an exact copy: Anthropic cuts some URLs to their host, redacts MCP server tokens, removes thinking blocks, and can replace an image or a document with resized images or a placeholder.
217 
218Anthropic records one sender for each message:
219 
220| Sender | `user` | `api_key_id` |
221| ----- | ----- | ----- |
222| A [personal key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) or a user’s sign-in | The account’s ID and email address | `null` |
223| A workspace key | `null` | The key’s ID |
224| A service account, or no sender recorded | `null` | `null` |
225 
226`user` identifies the account, not the person who wrote the prompt. To find that person, use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). `email_address` is always `null` in an organization with no parent organization, and it can be `null` in others.
434`details.content` holds the stored request and response. It’s not an exact copy: Anthropic cuts some URLs to their host, redacts MCP server tokens, removes thinking blocks, and can replace an image or a document with resized images or a placeholder. `details.content.response` is `null` if no response was stored.
435 
436Anthropic records one sender for each message, in `actor`:
437 
438| Sender | `actor` |
439| ----- | ----- |
440| A [personal key](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) or a user’s sign-in | A `user_actor`, with the account’s `user_id` and `email_address` |
441| A workspace key | An `api_actor`, with the key’s `api_key_id` |
442| A service account | A `service_account_actor`, with its `service_account_id` |
443| No sender recorded | `null` |
444 
445A `user_actor` identifies the account, not the person who wrote the prompt. To find that person, use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). `email_address` is always `null` in an organization with no parent organization, and it can be `null` in others.
446 
447Anthropic can add other `actor`, `read_reason`, and `content_unavailable_reason` types, so accept the ones you don’t know.
227448 
228449A Safety Case can list a message that you can’t read. This table shows what the request can return:
229450 
from line 452
231452| ----- | ----- | ----- |
232453| A 404 error | For example, the message has expired or is no longer flagged. | A 404 error can be temporary, so try again later before you treat a message as unreadable. |
233454| A 404 error for every message | This happens if Anthropic hasn’t turned on message reads for your organization, or if your organization no longer has Anthropic’s approval to turn off Anthropic Human Review. | See [Reach out for help](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help). A 404 error can be temporary, so try again later before you treat a message as unreadable. |
234| A 503 error | The error can be temporary. | Try again later before you treat a message as unreadable. |
235| The message, with `content` set to `null` | Anthropic has no copy of the text. `content_unavailable_reason` is `not_captured` or `use_ref`, and Anthropic can add values. | With `use_ref`, `refs` can hold an ID that names the conversation. Read the conversation through the Compliance API endpoint for that ID, with a key that has access to it. |
236 
237Read and save each message as soon as the Safety Case arrives, and no later than `content_expires_at`. That time is at most 28 days after `sampled_at`, and an open Safety Case doesn’t extend it. A message can stop being readable before that time.
455| A 503 error | The error can be temporary. | Try again later before you treat a message as unreadable. If the error continues and the workspace has a customer-managed key, check that key. |
456| A 400 error with `error.details.error_code` set to `cmek_key_disabled`, `storage_bucket_unreadable`, or `customer_storage_refusal_unattributed` | Your customer-managed key refused the read, your bucket refused it, or Anthropic can’t tell which. | See [`cmek_key_disabled`](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cmek-key-disabled) or [If your bucket stops working](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/external-storage-manage#if-your-bucket-stops-working), then try again. If nothing changed on your side, see [Reach out for help](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help). |
457| The message, with `details.content` set to `null` | Anthropic can’t return the text. `details.content_unavailable_reason.type` is `not_captured` if no copy was stored, or `stored_copy_unavailable` if Anthropic can’t return the stored copy. `details.model` can be `null` too. | Use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). |
458 
459Read and save each message as soon as the Safety Case arrives, and no later than `content_expires_at`. That time is at most 28 days after `created_at`, and an open Safety Case doesn’t extend it. A message can stop being readable before that time.
238460 
239461## Respond to a Safety Case
240462 
from line 468
246468 
247469Send one request within 7 calendar days of the Safety Case’s `created_at`:
248470 
249```bash cURL
250curl --fail-with-body -sS \
251 "https://api.anthropic.com/v1/compliance/review/cases/rvc_01Hq3Zt8KpWv5NcR2yLbXs7D/respond" \
252 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
253 -H "anthropic-version: 2026-10-21" \
254 -H "content-type: application/json" \
255 -d '{
256 "determination": "violation",
257 "policy_categories": ["cyber"]
258 }'
259```
471<CodeGroup>
472 ```bash cURL
473 curl --fail-with-body -sS \
474 "https://api.anthropic.com/v1/compliance/review/cases/rvc_01Hq3Zt8KpWv5NcR2yLbXs7D/respond" \
475 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
476 -H "anthropic-version: 2026-10-21" \
477 -H "content-type: application/json" \
478 -d '{
479 "determination": "violation",
480 "policy_categories": ["cyber"]
481 }'
482 ```
483 
484 ```bash CLI
485 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases respond \
486 --case-id rvc_01Hq3Zt8KpWv5NcR2yLbXs7D \
487 --determination violation \
488 --policy-category cyber
489 ```
490 
491 ```python Python
492 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
493 
494 case = client.beta.compliance.review.cases.respond(
495 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
496 determination="violation",
497 policy_categories=["cyber"],
498 )
499 
500 print(case.status.type)
501 ```
502 
503 ```typescript TypeScript
504 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
505 
506 const reviewCase = await client.beta.compliance.review.cases.respond(
507 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
508 { determination: "violation", policy_categories: ["cyber"] }
509 );
510 
511 console.log(reviewCase.status.type);
512 ```
513 
514 ```csharp C#
515 using Anthropic.Models.Beta.Compliance.Review.Cases;
516 
517 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
518 
519 var reviewCase = await client.Beta.Compliance.Review.Cases.Respond(
520 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
521 new()
522 {
523 Determination = BetaComplianceReviewDetermination.Violation,
524 PolicyCategories = [BetaComplianceReviewViolatedPolicyCategory.Cyber],
525 }
526 );
527 
528 Console.WriteLine(reviewCase.Status.Type.Raw());
529 ```
530 
531 ```go Go
532 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
533 
534 reviewCase, err := client.Beta.Compliance.Review.Cases.Respond(
535 context.Background(),
536 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
537 anthropic.BetaComplianceReviewCaseRespondParams{
538 Determination: anthropic.BetaComplianceReviewDeterminationViolation,
539 PolicyCategories: []anthropic.BetaComplianceReviewViolatedPolicyCategory{
540 anthropic.BetaComplianceReviewViolatedPolicyCategoryCyber,
541 },
542 },
543 )
544 if err != nil {
545 log.Fatal(err)
546 }
547 
548 fmt.Println(reviewCase.Status.Type)
549 ```
550 
551 ```java Java
552 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewDetermination;
553 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewViolatedPolicyCategory;
554 import com.anthropic.models.beta.compliance.review.cases.CaseRespondParams;
555 
556 void main() {
557 AnthropicClient client = AnthropicOkHttpClient.builder()
558 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
559 .build();
560 
561 var params = CaseRespondParams.builder()
562 .caseId("rvc_01Hq3Zt8KpWv5NcR2yLbXs7D")
563 .determination(BetaComplianceReviewDetermination.VIOLATION)
564 .addPolicyCategory(BetaComplianceReviewViolatedPolicyCategory.CYBER)
565 .build();
566 var reviewCase = client.beta().compliance().review().cases().respond(params);
567 
568 IO.println(reviewCase.status().type());
569 }
570 ```
571 
572 ```php PHP
573 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
574 
575 $case = $client->beta->compliance->review->cases->respond(
576 'rvc_01Hq3Zt8KpWv5NcR2yLbXs7D',
577 determination: 'violation',
578 policyCategories: ['cyber'],
579 );
580 
581 echo $case->status->type, PHP_EOL;
582 ```
583 
584 ```ruby Ruby
585 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
586 
587 review_case = client.beta.compliance.review.cases.respond(
588 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
589 determination: :violation,
590 policy_categories: [:cyber]
591 )
592 
593 puts review_case.status.type
594 ```
595</CodeGroup>
260596 
261597`determination` is required, `policy_categories` is required with `violation`, and `verdicts` is optional:
262598 
263599 

manage-claude/ip-allowlist Changed · +5 / -6 lines

from line 8
88 
99IP allowlisting protects your organization by only allowing [covered requests](https://platform.claude.com/docs/en/manage-claude/ip-allowlist#where-the-allowlist-applies) to come from specific IP ranges. This means that if an API key is leaked, it is much harder for an attacker to use the key. This can prevent data leaks and reduce the likelihood of being charged for abusive use.
1010 
11An allowlist limits where a key works, but not for how long. You should also set a short [key expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration), or move to [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) to stop using static keys. This is safer than allowlisting alone.
12 
1311<Note>
1412 IP allowlisting is available in beta under your agreement with Anthropic, such as the [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms) and the [Service Specific Terms](https://www.anthropic.com/legal/service-specific-terms). Settings and behavior can change during the beta.
1513</Note>
from line 26
2826* **The Claude Console:** UI access is restricted.
2927* **The following Claude API endpoints:** [Messages](https://platform.claude.com/docs/en/api/messages), [Message Batches](https://platform.claude.com/docs/en/build-with-claude/batch-processing), [Token Counting](https://platform.claude.com/docs/en/build-with-claude/token-counting), [Models](https://platform.claude.com/docs/en/api/models/list), [Files](https://platform.claude.com/docs/en/build-with-claude/files), and [Skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide), with an API key or a Workload Identity Federation token.
3028* **The following Claude Managed Agents endpoints:** [Agents](https://platform.claude.com/docs/en/managed-agents/agent-setup), [Sessions](https://platform.claude.com/docs/en/managed-agents/sessions), [Environments](https://platform.claude.com/docs/en/managed-agents/environments), [Vaults](https://platform.claude.com/docs/en/managed-agents/vaults), and [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory), with an API key or a Workload Identity Federation token.
31* **The following organization APIs:** The [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api), with a [key that covers only this organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#which-key-do-you-need).
29* **The following organization APIs:** the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api), with a key that covers only this organization.
3230 
3331See also [Limitations](https://platform.claude.com/docs/en/manage-claude/ip-allowlist#limitations).
3432 
from line 44
4644 
4745This includes connectors and artifacts in these apps, except artifacts that a user shared outside the organization. For Claude Science, see [Identity and access in the Claude Science admin controls](https://claude.com/docs/claude-science/admin-controls#identity-and-access).
4846 
49The allowlist also covers the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api), with a [key that covers only this organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#which-key-do-you-need).
47The allowlist also covers the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api), with a [key that covers only this organization](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#which-organizations-a-key-reaches).
5048 
5149See also [Limitations](https://platform.claude.com/docs/en/manage-claude/ip-allowlist#limitations).
5250 
from line 60
6260 
6361* **Claude Platform:** The allowlist covers requests to the [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) endpoints, not the agents themselves. It doesn’t apply to any networking in the Claude Managed Agents runtime. The allowlist doesn’t apply to [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview), or [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry).
6462* **Claude Enterprise:** Claude Design, Claude in Slack, and Claude Academy aren’t covered. If Claude is working on a task in a chat when a user is blocked, the task can continue for up to 24 hours. The user can’t open or control that chat from outside the list.
63* **Key lifetime:** The allowlist limits where a key works, but not for how long. In a Claude Platform organization, set a short [key expiration](https://platform.claude.com/docs/en/manage-claude/api-keys#key-expiration) or move to [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation), which uses short-lived tokens instead of keys. This is safer than allowlisting alone. In a Claude Enterprise organization, an Enterprise Admin API key doesn’t expire.
6564 
6665## Turn on the allowlist
6766 
from line 68
6968 <Step title="Turn on the toggle">
7069 Go to your organization’s settings page:
7170 
72 * **Claude Platform:** The [Security](https://platform.claude.com/settings/identity) page in the Claude Console
73 * **Claude Enterprise:** [claude.ai > Organization settings > Organization and access](https://claude.ai/admin-settings/organization#ip-allowlist)
71 * **Claude Platform:** the [Security](https://platform.claude.com/settings/identity) page in the Claude Console
72 * **Claude Enterprise:** the [Organization and access settings](https://claude.ai/admin-settings/organization#ip-allowlist) page in claude.ai (**Organization settings** > **Organization and access**)
7473 
7574 Turn on the **IP allowlist** toggle. Nothing changes until you save.
7675 </Step>

manage-claude/organization-webhooks Changed · +9 / -9 lines

## If your default workspace uses an encryption key ## If your Default Workspace uses an encryption key

from line 29
2929 
3030 * An [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
3131 * An [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) with the `org:admin` scope.
32 * A [personal or service account key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) that isn’t scoped to a workspace.
32 * A [personal or service account key](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) scoped to the organization.
3333 
34With an Admin API key, you can make every request in [Manage endpoints](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#manage-endpoints). With an `org:admin` token, you can make the same requests. If the token is bound to a workspace other than your organization’s [Default Workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work), you can’t make any of them. With a personal or service account key, the requests you can make depend on the account’s [organization role](https://platform.claude.com/docs/en/manage-claude/admin-api#organization-roles-and-permissions):
34With an Admin API key, you can make every request in [Manage endpoints](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#manage-endpoints). An `org:admin` token scoped to a workspace other than your organization’s [default workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work) can’t make any of them. With any other `org:admin` token, a personal key, or a service account key, the requests you can make depend on the account’s [organization role](https://platform.claude.com/docs/en/manage-claude/admin-api#organization-roles-and-permissions):
3535 
3636* To list or get webhook endpoints: `developer` or `admin`
3737* To create, update, or delete webhook endpoints, or to replace a signing secret: `admin`
from line 159
159159| No request uses the key within about a day of the last refusal | `external_key.recovered`, because Anthropic stops waiting for a success |
160160| Your KMS has an outage or times out | Both events, because an outage isn’t a refusal |
161161| Keys at several organizations start to fail at about the same time | Both events and the emails, because the cause might be Anthropic or a cloud provider |
162| [Your Default Workspace’s key](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#if-your-default-workspace-uses-an-encryption-key) fails, and it encrypts a value of your endpoint | Every event until the key works again, including its own `external_key.failed` |
162| [Your default workspace’s encryption key](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#if-your-default-workspace-uses-an-encryption-key) fails, and it encrypts your endpoint’s name, description, or signing secret | Every event until the key works again, including its own `external_key.failed` |
163163 
164164Because you can miss either event, you might receive `external_key.failed` twice in a row, or `external_key.recovered` with no `external_key.failed` before it.
165165 
from line 239
239239| The check reaches no result | Both events, until a check reaches a result | Unchanged |
240240| The bucket failed before you added these events to an endpoint | `external_storage.failed` | `false` |
241241| Buckets at several organizations, yours included, start failing on the same day | Both events and the emails | Usually `false` |
242| [Your Default Workspace’s key](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#if-your-default-workspace-uses-an-encryption-key) fails, and it encrypts a value of your endpoint | Every event until the key works again | Up to date |
242| [Your default workspace’s encryption key](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#if-your-default-workspace-uses-an-encryption-key) fails, and it encrypts your endpoint’s name, description, or signing secret | Every event until the key works again | Up to date |
243243 
244244Two of these cases need a check of your own:
245245 
from line 588
588588 
589589If you have the `admin` organization role, you can instead manage endpoints for encryption key events and customer-owned storage events in the Claude Console. Use the **Organization** tab of the [Webhooks](https://platform.claude.com/settings/webhooks) page, which shows the signing secret once, when you create an endpoint or replace its secret.
590590 
591## If your Default Workspace uses an encryption key
591## If your default workspace uses an encryption key
592592 
593Anthropic stores your organization’s endpoints in your [Default Workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work). If that workspace uses a [customer-managed encryption key](https://platform.claude.com/docs/en/manage-claude/cmek), Anthropic encrypts these values with the key:
593Anthropic stores your organization’s endpoints in your [default workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work). If that workspace uses a [customer-managed encryption key](https://platform.claude.com/docs/en/manage-claude/cmek), Anthropic encrypts these values with the key:
594594 
595595| Value | Requests that encrypt it |
596596| ----- | ----- |
from line 619
619619A request returns a `400` if:
620620 
621621* Its `url` doesn’t meet the rules in [Endpoint fields](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#endpoint-fields), or a create request lists no event types. The error message says what’s wrong.
622* Your organization has no Default Workspace.
622* Your organization has no default workspace.
623623* It would give your organization more than 32 organization webhook endpoints.
624624* Its `enabled_events` includes an event type that organization webhook endpoints don’t accept. The error message lists the accepted types.
625625 

manage-claude/plugins-api Changed · +14 / -12 lines

from line 16
1616For plugin *usage* reporting (which plugins and skills members use, and how often), see [Analytics APIs](https://platform.claude.com/docs/en/manage-claude/analytics-api).
1717 
1818<Check>
19 **Scoped Admin API key required**
19 **Enterprise Admin API key required**
2020 
21 These endpoints require an Admin API key with the `read:plugins` scope (for `GET` endpoints, including archive downloads) or the `write:plugins` scope (for `POST` and `DELETE` endpoints, except marketplace validation, which either scope allows); [Scopes](https://platform.claude.com/docs/en/manage-claude/plugins-api#scopes) has the details, including two other read scopes that also work. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one. Pass the key in the `x-api-key` header on every request, together with the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header and the beta header shown in the following note.
21 These endpoints require an Enterprise Admin API key. `GET` endpoints accept the `read:plugins` scope, and `POST` and `DELETE` endpoints accept the `write:plugins` scope. Some endpoints also accept other scopes: see [Scopes](https://platform.claude.com/docs/en/manage-claude/plugins-api#scopes).
2222</Check>
2323 
24<Note>
25 The Plugins API is in **beta** and is available to Claude Enterprise organizations only. It is not available to Claude Platform (Claude Console) organizations, or to organizations with HIPAA readiness enabled.
24The Plugins API is in **beta** and is available to Claude Enterprise organizations only. It is not available to Claude Platform (Claude Console) organizations or to organizations with HIPAA readiness enabled.
2625 
27 Every request must include the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-plugins-2026-09-01` (the SDK and the `ant` CLI send it for you). A request without it returns `404`, exactly as if the endpoint did not exist.
28</Note>
26Every request must include the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-plugins-2026-09-01` (the SDK and the `ant` CLI send it for you). A request without it returns `404`, exactly as if the endpoint did not exist.
2927 
3028## Endpoints
3129 
from line 44
4644## Prerequisites
4745 
4846* Your organization must be on a Claude Enterprise plan.
49* Your primary owner creates an Admin API key with the `read:plugins` scope, the `write:plugins` scope, or both in [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access). See [Create a key for a Claude Enterprise organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization).
50* Every request carries three headers: `x-api-key`, `anthropic-version: 2026-10-21`, and `anthropic-beta: ce-plugins-2026-09-01`.
47* Your primary owner creates an Enterprise Admin API key on the [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**). See [Create a key for a Claude Enterprise organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization). The key needs the `read:plugins` scope, the `write:plugins` scope, or both. Two other scopes also allow reads: see [Scopes](https://platform.claude.com/docs/en/manage-claude/plugins-api#scopes).
48* Every cURL request carries the `x-api-key`, `anthropic-version: 2026-10-21`, and `anthropic-beta: ce-plugins-2026-09-01` headers. A request with a JSON body also carries `content-type: application/json`. For the `anthropic-version` header’s values, see [API versions](https://platform.claude.com/docs/en/api/versioning).
5149 
5250In Python, TypeScript, C#, Go, Java, PHP, and Ruby, the SDK exposes these endpoints under `client.beta.organization` (csharp, go: `client.Beta.Organization`; java: `client.beta().organization()`; php: `$client->beta->organization`), and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) under `ant beta:organization`; they send the `anthropic-version` and `anthropic-beta` headers for you. The examples on this page read the Admin API key from the `ANTHROPIC_API_KEY` environment variable. Where an SDK or the CLI fetches more pages for you, `limit` sets the page size, not the total (see [Pagination](https://platform.claude.com/docs/en/manage-claude/plugins-api#pagination)).
5351 
from line 223
225223 
226224### Reading another organization under the same parent
227225 
228`read:plugins` and `write:plugins` keys read and write only the organization they were created in. Some companies have several Claude organizations linked under one parent organization. A `read:org_audit` or `read:compliance_org_data` [key created for all linked organizations](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) can also read any linked organization that has access to this API. To read one, pass its ID in the `organization_id` query parameter on any `GET` endpoint on this page. The ID is the organization UUID shown in claude.ai’s settings (its `org_`-prefixed form is accepted too). Without the parameter, the key reads the organization it was created in. A key with no organization of its own must always pass `organization_id`. A `404` means the named organization is not under the key’s parent or the API is not available to it; a value that is not a UUID or `org_` ID returns `400`. Any other key that names an organization other than its own gets `404`. Writes do not accept `organization_id`.
226`read:plugins` and `write:plugins` keys read and write only the organization they were created in. Some companies have several Claude organizations linked under one parent organization. A `read:org_audit` or `read:compliance_org_data` key created for all linked organizations can also read any linked organization that has access to this API. To create such a key, see [Key access](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#key-access) on the Admin API keys and tokens page.
229227 
228To read a linked organization, pass its ID in the `organization_id` query parameter on any `GET` endpoint on this page. The ID is the organization UUID shown in claude.ai’s settings (its `org_`-prefixed form is accepted too). Without the parameter, the key reads the organization it was created in. A key with no organization of its own must always pass `organization_id`. Writes do not accept `organization_id`.
229 
230A `404` means the named organization is not under the key’s parent or the API is not available to it. A key that can’t read linked organizations also gets `404` if it names an organization other than its own. A value that is not a UUID or `org_` ID returns `400`.
231 
230232## Key concepts
231233 
232234### Plugins and components
from line 3410
34083410## See also
34093411 
34103412<CardGroup cols={2}>
3411 <Card title="Create an Admin API key" href="https://platform.claude.com/docs/en/manage-claude/admin-api-keys">
3413 <Card title="Admin API keys and tokens" href="https://platform.claude.com/docs/en/manage-claude/admin-api-keys">
34123414 Where your primary owner creates a scoped key.
34133415 </Card>
34143416 

manage-claude/rate-limits-api Changed · +6 / -2 lines

from line 5
55---
66 
77<Tip>
8 **The Admin API isn’t available to organizations on the claude.ai Team plan or to individual Claude Console accounts.** If your company also has a Claude Console organization, you can use the API with that organization; see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys). 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.
8 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.
99</Tip>
1010 
11If 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.
12 
1113The Rate Limits API provides programmatic access to the rate limits configured for your organization and its workspaces. This is the same information shown on the [Rate limits page in the Claude Console](https://platform.claude.com/usage/limits). You can also use it to set and clear a workspace’s rate limits.
1214 
1315Use this API to:
from line 20
1820* **Manage workspace limits from code:** Set and clear each workspace’s limits from your provisioning automation instead of editing them in the Console.
1921 
2022<Check>
21 **Admin API credentials required.** These endpoints are part of the Admin API. You can access them using an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an OAuth token with the `org:admin` scope, or a personal or service account key that isn’t scoped to a workspace; workspace API keys don’t work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
23 **Admin API credentials required.** These endpoints are part of the Admin API.
2224</Check>
25 
26Authenticate with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) or an OAuth token with the `org:admin` scope. You can also use a personal or service account key scoped to the organization. A personal or service account key has the permissions of its user or service account. Keys scoped to a single workspace, including workspace keys, don’t work. See the Admin API page’s [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) section.
2327 
2428The SDK’s default client and the CLI read the Admin API key from the `ANTHROPIC_API_KEY` environment variable. The SDK exposes these endpoints as `client.organization.rate_limits` (typescript: `client.organization.rateLimits`; csharp, go: `client.Organization.RateLimits`; java: `client.organization().rateLimits()`; php: `$client->organization->rateLimits`) and `client.organization.workspaces.rate_limits` (typescript: `client.organization.workspaces.rateLimits`; csharp, go: `client.Organization.Workspaces.RateLimits`; java: `client.organization().workspaces().rateLimits()`; php: `$client->organization->workspaces->rateLimits`). The comments in each list example say whether it fetches more pages or reads only the first.
2529 

manage-claude/spend-limits-api Changed · +16 / -10 lines

### What happens when you delete a per-user override? ### Can you set a seat-tier or organization-wide default through this API? ### What happens when I delete a per-user override? ### Can I set a seat-tier or organization-wide default through this API?

from line 9
99For per-user and time-bucketed usage and cost *reporting*, see [Analytics APIs](https://platform.claude.com/docs/en/manage-claude/analytics-api) or the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api).
1010 
1111<Check>
12 **Scoped Admin API key required**
12 **Enterprise Admin API key required**
1313 
14 These endpoints require an Admin API key with the `read:spend_limits` scope (for `GET` endpoints) or the `write:spend_limits` scope (for `POST` and `DELETE` endpoints). See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one and which scopes to select. Pass the key in the `x-api-key` header on every request, together with the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header.
14 These endpoints require an Enterprise Admin API key. `GET` endpoints need the `read:spend_limits` scope, and `POST` and `DELETE` endpoints need the `write:spend_limits` scope.
1515</Check>
1616 
17Your primary owner creates the key in claude.ai and selects its scopes. See [Create a key for a Claude Enterprise organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) on the Admin API keys and tokens page. In a cURL request, pass the key in the `x-api-key` header, together with the `anthropic-version` header ([API versions](https://platform.claude.com/docs/en/api/versioning)).
18 
1719<Note>
1820 The Spend Limits API is available to Claude Enterprise organizations only. It is not available to Claude Platform (Claude Console) organizations.
1921</Note>
from line 1187
11851187 
11861188## Example workflows
11871189 
1188Some of these workflows combine the Spend Limits API with the cost endpoint of the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api). The cost endpoint is designed for organization-wide spend reporting across a date range. `GET /spend_limits/effective` returns the cap that currently applies to each member. Start a sweep with the cost endpoint to discover which members to look at, then read their current caps with `/effective`.
1190Some of these workflows combine the Spend Limits API with the cost endpoint of the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api). The cost endpoint reports your organization’s spend across a date range and can group it by member. Start there to find which members to look at. Then, read the spend limit that applies to each of them with `GET /v1/organizations/spend_limits/effective`.
11891191 
1190Spend Limits endpoints require the `spend_limits` scopes and the cost endpoint requires `read:analytics`. The examples use one Admin API key that has the scopes of every API they call. A primary owner [selects these scopes when creating the key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#choose-scopes-for-a-claude-enterprise-key). All monetary values on both are decimal strings in minor units (cents). Both APIs paginate with an opaque cursor. Set an explicit `limit` and page through `next_page` until it’s `null` to cover the whole organization.
1192The cost endpoint also requires `read:analytics`. The examples use one Admin API key that has the scopes of every API they call. The primary owner [selects these scopes when creating the key](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#choose-scopes-for-a-claude-enterprise-key).
11911193 
1194All monetary values on both APIs are decimal strings in minor units, such as cents. See [Amounts and currency](https://platform.claude.com/docs/en/manage-claude/spend-limits-api#amounts-and-currency).
1195 
1196Both APIs paginate with an opaque cursor. Set an explicit `limit` and go through every page to cover the whole organization. For the Spend Limits endpoints, see [Pagination](https://platform.claude.com/docs/en/manage-claude/spend-limits-api#pagination).
1197 
11921198### Automate the increase-request review flow
11931199 
11941200Run a scheduled job that fetches pending requests, applies your organization’s approval policy, and resolves each one.
from line 1610
16041610 ```
16051611 </CodeGroup>
16061612 
1607 Each row contains `group.actor.user_id`, `group.actor.email_address`, and `cost.amount` (the member’s spend in cents). Page through `next_page` to cover the whole organization.
1613 Each row contains `group.actor.user_id`, `group.actor.email_address`, and `cost.amount` (the member’s spend in minor units of the row’s `cost.currency`, such as cents).
16081614 
160916152. For the top spenders (or everyone above a dollar threshold), fetch effective caps in batches:
16101616 
from line 1956
19501956 ```
19511957 </CodeGroup>
19521958 
1953 With `time_bucket_width` set, each member spans one row for each day with usage. Page through `next_page` to collect every member’s full series.
1959 With `time_bucket_width` set, each member has one row for each day with usage. Go through every page to collect every member’s full series.
19541960 
195519612. Group rows by `group.actor.user_id`. For each member, sum the most recent 7 days and the prior 7 days. Flag members whose recent week exceeds the prior week by your chosen multiple (for example, three). Cost for recent days can still change. For repeatable comparisons, set `ending_at` at or before a `data_refreshed_at` you have already seen (see [Data freshness](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#data-freshness)).
19561962 
from line 2371
23652371 
23662372No. `POST /v1/organizations/spend_limits` writes the override but leaves the pending request untouched. Use `POST /v1/organizations/spend_limit_increase_requests/{id}/approve` to resolve the request and write the override in one call.
23672373 
2368### What happens when I delete a per-user override?
2374### What happens when you delete a per-user override?
23692375 
23702376The member falls back to whatever they’d inherit from the hierarchy: their group, seat-tier, or organization default. If no default exists at any level, the member is unlimited.
23712377 
2372### Can I set a seat-tier or organization-wide default through this API?
2378### Can you set a seat-tier or organization-wide default through this API?
23732379 
23742380No. Only per-user overrides can be written through this API. Seat-tier, group, and organization-level defaults are configured in claude.ai Organization settings.
23752381 

manage-claude/usage-cost-analytics-api Changed · +28 / -25 lines

## On a cloud platform

from line 5
55---
66 
77<Tip>
8 **The Admin API isn’t available to organizations on the claude.ai Team plan or to individual Claude Console accounts.** If your company also has a Claude Console organization, you can use the API with that organization; see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys). 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.
8 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.
99</Tip>
1010 
11If 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.
12 
1113The Usage and Cost Analytics API reports historical token usage and cost for your organization, broken down by the dimensions you choose, such as model, workspace, API key, or the user or service account behind each request. For Claude Console organizations, this data is similar to what the [Usage](https://platform.claude.com/usage) and [Cost](https://platform.claude.com/cost) pages of the Claude Console show.
1214 
1315The API has two endpoints:
from line 26
2426* **Build time series:** Split results into daily, hourly, or per-minute buckets for dashboards and finance reports.
2527* **Integrate once:** The same endpoints, parameters, and response fields serve Claude Console and Claude Enterprise organizations.
2628 
27<Check>
28 **Authentication**
29The credential you send depends on your organization type. Claude Console organizations use a [Console Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) or another [Admin API credential](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication), such as an OAuth token with the `org:admin` scope. To get such a token, see the Admin API page’s [OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token) section.
2930 
30 Claude Console organizations use an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) or another [Admin API credential](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication), such as an OAuth token with the `org:admin` scope. Send an OAuth token in an `authorization: Bearer` header instead of the `x-api-key` header; see [Obtain an OAuth bearer token](https://platform.claude.com/docs/en/manage-claude/admin-api#oauth-bearer-token).
31Claude Enterprise organizations use a key with the `read:analytics` scope. The primary owner turns on the Analytics API in claude.ai, then creates the key there. See the Analytics APIs page’s [Get access to the Claude Enterprise Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api) section.
3132 
32 Claude Enterprise organizations use a key with the `read:analytics` scope, created in claude.ai by the primary owner after the Analytics API is enabled for the organization; see [Get access to the Claude Enterprise Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api).
33On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, requests use the platform’s own credentials instead. See [On a cloud platform](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#on-a-cloud-platform).
3334 
34 The examples on this page read a key from the `ANTHROPIC_API_KEY` environment variable, so set it to your key before you run them.
35The examples on this page read a key from the `ANTHROPIC_API_KEY` environment variable, so set it to your key before you run them. With an OAuth token, set `ANTHROPIC_AUTH_TOKEN` instead and unset `ANTHROPIC_API_KEY`, because the SDK and the `ant` CLI use the key when both are set. A direct HTTP request sends the token in an `authorization: Bearer` header in place of the `x-api-key` header.
3536 
36 If you call these endpoints with an Admin API key, give the service that collects this data its own key, store it in a secrets manager, and rotate it regularly; setting a [key expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration) when you create the key enforces the rotation. Where you can, use a [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) rule with the [`org:admin` scope](https://platform.claude.com/docs/en/manage-claude/wif-reference#oauth-scopes) instead, so the service gets short-lived tokens and there’s no long-lived key to leak.
37</Check>
38 
39<Note>
40 **Claude Platform on AWS:** Both endpoints are available. Requests use the Claude Platform on AWS base URL and authentication in place of an Admin API key (see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests)), and AWS IAM authorizes them through the [`ListAccountUsage` and `ListAccountCost` actions](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#usage-and-cost). Each request covers only the workspaces in the AWS region of the endpoint you call, so call each region’s endpoint to cover your whole organization. `user_profile_id`, `claude_tag_category`, `claude_tag_user_id`, and the Claude Managed Agents dimensions (`agent_id`, `environment_id`, `deployment_id`, and `session_id`) are `null` on every row.
41</Note>
42 
43<Note>
44 **Claude Models on Google Cloud (Anthropic managed):** Both endpoints are available. Call them through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The `/usage` endpoint needs the `usageAnalytics.list` [IAM permission](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions), and the `/cost` endpoint needs `costAnalytics.list`.
45</Note>
46 
4737## Quick start
4838 
4939Get daily token usage for the first week of September, one row for each model and day:
from line 243
253243}
254244```
255245 
246If you call these endpoints with an Admin API key, give the service that collects this data its own key. Store the key in a secrets manager and rotate it regularly. For a Console Admin API key, setting a [key expiration](https://platform.claude.com/docs/en/manage-claude/api-keys#key-expiration) when you create the key enforces the rotation. For a Console organization, you can use a [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) rule with the [`org:admin` scope](https://platform.claude.com/docs/en/manage-claude/wif-reference#oauth-scopes) instead. The service then gets short-lived tokens, and there’s no long-lived key to leak.
247 
256248<Tip>
257249 **Set a User-Agent header for integrations**
258250 
from line 270
278270 
279271The `actor` dimension is who a request is attributed to: a user, a service account, a federated cloud identity (an AWS or Google Cloud principal, for organizations that access Claude through their cloud platform), or, when none of those is behind the request, the API key itself. When you group by `actor`, each row’s `actor` is an object whose `type` says which kind it is. Usage that can’t be attributed to any identity has `actor: null`.
280272 
281[Personal keys and service account keys](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) act as the user or service account they’re linked to, so their requests show that identity as the `actor` and the key in `api_key_id`. Legacy workspace keys aren’t linked to an identity, so the key appears as both the `actor` and the `api_key_id`.
273[Personal keys and service account keys](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) act as the user or service account they’re linked to. Their requests show that identity as the `actor` and the key’s ID in `api_key_id`. Workspace keys (legacy) aren’t linked to an identity, so the `actor` is the key itself, and `api_key_id` holds its ID.
282274 
283275Requests made without an API key, such as from the Claude Console or with a [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) token, have `api_key_id: null`. With a Workload Identity Federation token, the `actor` is the service account the token acts as.
284276 
285Whichever way a member signs in to Claude Code with their Claude Console account, the `actor` is that member. If Claude Code creates an API key at sign-in, `api_key_id` is that key, which lives in the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace). After a [sign-in without an API key](https://code.claude.com/docs/en/authentication#sign-in-without-an-api-key), `api_key_id` is `null`.
277Whichever way a member signs in to Claude Code with their Claude Console account, the `actor` is that member. If Claude Code creates an API key at sign-in, `api_key_id` holds that key’s ID. The key lives in the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace). After a [sign-in without an API key](https://code.claude.com/docs/en/authentication#sign-in-without-an-api-key), `api_key_id` is `null`.
286278 
287279Token usage from some [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) sessions is attributed to an Anthropic-managed service account (`svac_...`). For this usage, `api_key_id` is `null`. The account isn’t listed with the service accounts that you create. See [Find session usage across your organization](https://platform.claude.com/docs/en/managed-agents/session-observability#find-session-usage-across-your-organization).
288280 
from line 789
797789 
798790Every response includes a `data_refreshed_at` timestamp, and usage after that time is missing or partial. When no data is available yet for any part of the requested range, `data_refreshed_at` is `null` and `data` is empty. Data typically refreshes within 4 hours of the underlying usage and can take up to 24 hours. Values can be revised as late events arrive and reconciliation runs, until about 7 days after the end of the calendar month. For example, values for October 1 can change until about November 7. For stable results across repeated calls, set `ending_at` at or before a `data_refreshed_at` you have already seen; for final totals, query only months that ended at least 7 days ago. Every page of a paginated query reads the same data snapshot, so `data_refreshed_at` is identical across pages.
799791 
792## On a cloud platform
793 
794**Claude Platform on AWS:** Both endpoints are available. Requests use the Claude Platform on AWS base URL and its authentication, not an Admin API key (see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests)). AWS IAM authorizes the requests through the [`ListAccountUsage` and `ListAccountCost` actions](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#usage-and-cost). Each request covers only the workspaces in the AWS region of the endpoint you call, so call each region’s endpoint to cover your whole organization.
795 
796On Claude Platform on AWS, these dimensions are `null` on every row:
797 
798* `user_profile_id`, `claude_tag_category`, and `claude_tag_user_id`
799* The Claude Managed Agents dimensions: `agent_id`, `environment_id`, `deployment_id`, and `session_id`
800 
801**Claude Models on Google Cloud (Anthropic managed):** Both endpoints are available. Call them through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The `/usage` endpoint needs the `usageAnalytics.list` [IAM permission](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions#usage-reports), and the `/cost` endpoint needs `costAnalytics.list`.
802 
800803## Migrate from the Usage and Cost API
801804 
802805This section is for organizations that call the legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) (`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report`). Your credential and the `anthropic-version` header carry over. So do the names `starting_at` and `ending_at`, the `[]` suffix on array parameters, the pagination field names, and the token and cost field names. The usage endpoint’s bucket widths (`1m`, `1h`, `1d`) carry over too. The following table lists what changes:
from line 807
804807| Usage and Cost API | Usage and Cost Analytics API |
805808| ----- | ----- |
806809| No beta header | `anthropic-beta: analytics-usage-cost-2026-08-24` on every request |
807| Data typically appears within 5 minutes | Data typically refreshes within 4 hours and can take up to 24 hours (see [Data freshness](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#data-freshness)) |
810| Usage data typically appears within about 30 minutes. Cost data is daily. | Data typically refreshes within 4 hours and can take up to 24 hours (see [Data freshness](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#data-freshness)) |
808811| `data` is a list of time buckets, oldest first, including empty ones, each with a `results` list whose entries hold dimensions and metrics side by side | `data` is a list of rows ranked by `order_by`, each with its own `starting_at` and `ending_at`, dimensions in `group`, and metrics in `usage` or `cost`. Combinations with no usage or cost have no row. |
809812| `bucket_width`, default `1d` | `time_bucket_width`, no default. Pass `time_bucket_width=1d` to keep daily rows; omit it for whole-range totals. The cost endpoint also accepts every filter and `1m` and `1h` buckets. |
810813| `limit` counts time buckets per page | `limit` counts rows per page (1 to 1,000, default 20), so the number of pages depends on how many combinations have data |
from line 821
818821| Cost `service_tier` is `standard` or `batch`; `amount` such as `"123.45"` | The actual tier; `amount` with six decimal places, such as `"123.450000"`, plus `list_amount`. |
819822| Code execution not in the usage report; no request counts | Code execution appears as usage rows with `model: null`; adds `requests` on both endpoints and `total_tokens` on usage rows |
820823 
821Two things differ for a Claude Enterprise organization:
824`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report` are not available to Claude Enterprise organizations. To move an integration that called them with an [Analytics API key](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api), follow this section, with these differences:
822825 
823826* **Workspaces and API keys:** The Usage and Cost Analytics API returns `null` for `workspace_id` and `api_key_id` (see [How results are shaped](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#how-results-are-shaped)), so the table’s row on the default workspace doesn’t apply.
824* **Usage totals:** The Usage and Cost Analytics API counts usage that the legacy usage report leaves out, so its usage totals can be higher. See [Claude Enterprise organizations](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#claude-enterprise-organizations).
827* **Usage totals:** `/v1/organizations/usage_report/messages` leaves out usage from some Claude products, such as Cowork, text chats in Claude, and Claude Code in the terminal. The Usage and Cost Analytics API counts that usage, so its totals can be higher.
825828 
826829To reproduce the legacy daily report, request `time_bucket_width=1d` with the same `group_by[]`, page through with `limit=1000`, then group rows by `starting_at` and fill missing days with zeros. Add `order_by=time&order=asc` to get the days in order. Daily usage by model for 1 week, before:
827830 

manage-claude/usage-cost-api Changed · +21 / -41 lines

### Claude Enterprise organizations

from line 1
11---
22title: Usage and Cost API
33url: https://platform.claude.com/docs/en/manage-claude/usage-cost-api
4description: The legacy Admin API usage and cost report endpoints. For new integrations, use the Usage and Cost Analytics API.
4description: The legacy Admin API usage and cost report endpoints for Claude Console organizations. For new integrations, use the Usage and Cost Analytics API.
55---
66 
77<Tip>
8 **The Admin API isn’t available to organizations on the claude.ai Team plan or to individual Claude Console accounts.** If your company also has a Claude Console organization, you can use the API with that organization; see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys). 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.
8 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.
99</Tip>
1010 
11If 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.
12 
1113<Note>
12 The Usage and Cost API (`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report`) is a legacy API and remains supported. For new integrations, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which reports usage and cost with more grouping and filtering dimensions. To move an existing integration, see [Migrate from the Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#migrate-from-usage-cost-api).
14 The Usage and Cost API (`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report`) is a legacy API and is supported for Claude Console organizations. For new integrations, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which reports usage and cost with more grouping and filtering dimensions. To move an existing integration, see [Migrate from the Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#migrate-from-usage-cost-api).
1315</Note>
1416 
15The Usage and Cost API provides programmatic and granular access to historical API usage and cost data for your organization. For Claude Console organizations, this data is similar to what the Claude Console shows on the [Usage](https://platform.claude.com/usage) page (`platform.claude.com/usage`) and the [Cost](https://platform.claude.com/cost) page (`platform.claude.com/cost`).
17The Usage and Cost API provides programmatic and granular access to historical API usage and cost data for your organization. This data is similar to what the Claude Console shows on the [Usage](https://platform.claude.com/usage) page (`platform.claude.com/usage`) and the [Cost](https://platform.claude.com/cost) page (`platform.claude.com/cost`).
1618 
1719This API allows you to better monitor, analyze, and optimize your Claude implementations:
1820 
from line 21
1921* **Accurate usage tracking:** Get precise token counts and usage patterns instead of relying solely on response token counting
2022* **Cost reconciliation:** Match internal records with Anthropic billing for finance and accounting teams
2123* **Product performance and improvement:** Monitor product performance while measuring if changes to the system have improved it, or set up alerting
22* **[Rate limit](https://platform.claude.com/docs/en/api/rate-limits) optimization:** Optimize features such as [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) or specific prompts to use your allocated capacity efficiently.
24* **[Rate limit](https://platform.claude.com/docs/en/api/rate-limits) optimization:** Optimize features such as [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) or specific prompts to use your allocated capacity efficiently
2325* **Advanced analysis:** Perform deeper data analysis than what’s available in Console
2426 
2527<Check>
26 **Authentication**
28 **Admin API credentials required.** These endpoints are part of the Admin API.
29</Check>
2730 
28 These endpoints are part of the Admin API. Claude Console organizations can access them using any of these credentials:
31Authenticate with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) or an OAuth token with the `org:admin` scope. You can also use a personal or service account key scoped to the organization. A personal or service account key has the permissions of its user or service account. Keys scoped to a single workspace, including workspace keys, don’t work. See the Admin API page’s [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) section.
2932 
30 * An [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys)
31 * An OAuth token with the `org:admin` scope
32 * A personal or service account key that isn’t scoped to a workspace
33These endpoints are not available to Claude Enterprise organizations, which use an Analytics API key with the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api).
3334 
34 Workspace API keys don’t work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
35**Claude Platform on AWS:** Use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) instead of the Usage and Cost API.
3536 
36 Claude Enterprise organizations use an Analytics API key, and the usage endpoint leaves out some of their usage; see [Claude Enterprise organizations](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#claude-enterprise-organizations).
37</Check>
37**Claude Models on Google Cloud (Anthropic managed):** Of the Usage and Cost API endpoints, only the [usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api) is available. Call it through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The only predefined [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that allows this call is `roles/claude.admin`. For cost data, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) or the **Cost** page in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
3838 
39<Note>
40 **Claude Platform on AWS:** The Usage and Cost API endpoints are not available. Use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api).
41</Note>
42 
43<Note>
44 **Claude Models on Google Cloud (Anthropic managed):** Of the Usage and Cost API endpoints, only the [usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api) is available. Call it through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The only predefined [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that allows this call is `roles/claude.admin`. For cost data, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) or the **Cost** page in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
45</Note>
46 
4739## Which API do you need?
4840 
4941The APIs you can call, and the key each one takes, depend on which Claude product your organization uses:
from line 43
5143| API | Claude Console (Claude Platform) | Claude Enterprise (claude.ai) |
5244| ----- | ----- | ----- |
5345| [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) (recommended) | Admin API key (`sk-ant-admin01-...`) or another [Admin API credential](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) | Analytics API key |
54| Usage and Cost API (legacy), which this page documents | Admin API key or another Admin API credential | Analytics API key |
46| Usage and Cost API (legacy), which this page documents | Admin API key or another Admin API credential | Not available |
5547| [Claude Enterprise Analytics API](https://platform.claude.com/docs/en/api/beta/organization/analytics) cost and usage endpoints (legacy) | Not available | Analytics API key |
5648 
5749Claude Enterprise parent organizations do not appear in Claude Console and carry no Admin API keys, so for them the Analytics API key is the only path to this data. See [Analytics APIs](https://platform.claude.com/docs/en/manage-claude/analytics-api) for how to create each key type and which plans the Claude Enterprise cost data applies to.
5850 
59### Claude Enterprise organizations
60 
61A Claude Enterprise organization uses one [Analytics API key](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api) for all three APIs in the table. For these APIs, the key reads only the organization it was created in. Send it in the `x-api-key` header, as the examples on this page do with an Admin API key.
62 
63For these organizations, the two endpoints don’t cover the same usage, so you can’t reconcile one against the other:
64 
65* **[Usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api):** It leaves out usage from some Claude products, so its totals can be lower than the organization’s usage. For example, it doesn’t count the following:
66 
67 * Cowork
68 * Claude Code in the terminal, IDEs, and the desktop app
69 * Text chats in Claude on the web, desktop, and mobile
70 
71* **[Cost endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#cost-api):** With a `starting_at` on or after October 1, 2025, it covers usage-based charges across Claude products, including the three in the previous list. It doesn’t include seat fees or usage that a seat covers.
72 
7351## Partner solutions
7452 
7553Leading observability platforms offer ready-to-use integrations for monitoring your Claude API usage and cost, without writing custom code. These integrations provide dashboards, alerting, and analytics to help you manage your API usage effectively.
from line 231
253231 
254232| Granularity | Default limit | Maximum limit | Use case |
255233| ----- | ----- | ----- | ----- |
256| `1m` | 60 buckets | 1,440 buckets | Real-time monitoring |
234| `1m` | 60 buckets | 1,440 buckets | Minute-level analysis |
257235| `1h` | 24 buckets | 168 buckets | Daily patterns |
258236| `1d` | 7 buckets | 31 buckets | Weekly/monthly reports |
259237 
from line 307
329307 
330308### How fresh is the data?
331309 
332Usage and cost data typically appears within 5 minutes of API request completion, though delays might occasionally be longer.
310Usage data typically appears within about 30 minutes after an API request completes, though delays can be longer. The API returns a time bucket only after it ends, so results leave out the current UTC minute, hour, or day. A bucket that ended in the last 30 minutes or so can be incomplete or empty until its usage arrives.
333311 
312Cost data is daily, so each UTC day appears only after it ends, and the most recent day can be incomplete.
313 
334314### What’s the recommended polling frequency?
335315 
336316The API supports polling once per minute for sustained use. For short bursts (for example, downloading paginated data), more frequent polling is acceptable. Cache results for dashboards that need frequent updates.
from line 337
357337 
358338### How do I get per-user cost breakdowns for Claude Code?
359339 
360Call the cost endpoint of the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#how-do-i-get-per-user-cost-for-claude-code) with `products[]=claude_code&group_by[]=actor`. For cost by API key, group by `api_key_id` instead. The [Claude Code Analytics API](https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api) also provides per-user estimated costs and productivity metrics.
340Call the cost endpoint of the Usage and Cost Analytics API with `products[]=claude_code&group_by[]=actor`. For cost by API key, group by `api_key_id` instead. For details, see [How do I get per-user cost for Claude Code?](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#how-do-i-get-per-user-cost-for-claude-code) on the Usage and Cost Analytics API page. The [Claude Code Analytics API](https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api) also provides per-user estimated costs and productivity metrics.
361341 
362342## See also
363343 

manage-claude/user-management Changed · +28 / -15 lines

from line 4
44description: "Manage the people in your Claude Enterprise organization with the Admin API: list members and change roles, send and withdraw invites, manage groups, and read custom roles."
55---
66 
7This page covers managing the people in your **Claude Enterprise** (claude.ai) organization programmatically, using the [Admin API](https://platform.claude.com/docs/en/api/beta/organization):
7This page covers managing the people in your **Claude Enterprise** (claude.ai) organization programmatically, using the [Admin API endpoints](https://platform.claude.com/docs/en/api/beta/organization):
88 
99* List members and look them up by email address
1010* Change a member’s role
11* Remove members, or sign them out everywhere without removing them (beta)
11* Remove members or sign them out everywhere without removing them (in beta)
1212* Send and withdraw invites
1313* Manage your enterprise’s groups and their membership
1414* Read your organization’s custom roles
1515 
16For Claude Console (Claude Platform) organizations, see the [Admin API guide for Claude Console](https://platform.claude.com/docs/en/manage-claude/admin-api).
16For Claude Console (Claude Platform) organizations, see the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) page.
1717 
1818## Which endpoints can your organization use?
1919 
from line 21
2121 
2222| Endpoints | Claude Console (Claude Platform) | Claude Enterprise (claude.ai) |
2323| ----- | ----- | ----- |
24| [Members](https://platform.claude.com/docs/en/manage-claude/user-management#members) and [invites](https://platform.claude.com/docs/en/manage-claude/user-management#invites) | Available; see the [Admin API guide](https://platform.claude.com/docs/en/manage-claude/admin-api) | Available (this page) |
24| [Members](https://platform.claude.com/docs/en/manage-claude/user-management#members) and [invites](https://platform.claude.com/docs/en/manage-claude/user-management#invites) | Available; see the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) page | Available (this page) |
2525| [Groups](https://platform.claude.com/docs/en/manage-claude/user-management#groups) | Not available | Available (this page) |
2626| [Custom roles](https://platform.claude.com/docs/en/manage-claude/user-management#custom-roles) | Not available | Available, read-only (this page) |
2727| [Plugins](https://platform.claude.com/docs/en/manage-claude/plugins-api) and [Claude Tag](https://platform.claude.com/docs/en/manage-claude/claude-tag-api) | Not available | Available in beta |
2828| [Spend limits](https://platform.claude.com/docs/en/manage-claude/spend-limits-api) | Not available | Available |
2929| Usage and cost reports | Available; see the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) | Available through the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) and the [Claude Enterprise Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api) |
30| [Workspaces](https://platform.claude.com/docs/en/manage-claude/workspaces), [API keys](https://platform.claude.com/docs/en/manage-claude/admin-api#api-keys), [rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api), and the other endpoints in the [Admin API guide](https://platform.claude.com/docs/en/manage-claude/admin-api) | Available | Not available |
30| [Workspaces](https://platform.claude.com/docs/en/manage-claude/workspaces), [API keys](https://platform.claude.com/docs/en/manage-claude/admin-api#api-keys), [rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api), and the other endpoints on the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) page | Available | Not available |
3131 
3232Members and invites are the same endpoints for both organization types; this page documents their Claude Enterprise behavior, including the Claude Enterprise [organization roles](https://platform.claude.com/docs/en/manage-claude/user-management#organization-roles). The group and custom-role endpoints exist only for Claude Enterprise.
3333 
3434<Check>
35 **Scoped Admin API key required**
35 **Enterprise Admin API key required**
3636 
37 These endpoints require an Admin API key with the scope that matches the request. Member and invite `GET` endpoints, and all custom-role endpoints, need `read:members` (there is no separate role scope). Member and invite `POST` and `DELETE` endpoints need `write:members`. Group `GET` endpoints need `read:rbac_groups`, and group `POST` and `DELETE` endpoints need `write:rbac_groups`. Assigning the `managed` role, or groups on an invite, requires `write:rbac_groups` in addition to `write:members`. A key carrying the `read:org_audit` scope (a read-only scope for security-audit integrations) can also call every `GET` endpoint on this page and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) read endpoints. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where to create one and which scopes to select. Pass the key in the `x-api-key` header on every request, together with the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header.
37 For a Claude Enterprise organization, these endpoints require an Enterprise Admin API key with the scope that matches the request.
3838</Check>
3939 
40The scope depends on the endpoint:
41 
42* Member and invite `GET` endpoints need `read:members`, and custom-role endpoints accept it.
43* Member and invite `POST` and `DELETE` endpoints need `write:members`.
44* Group `GET` endpoints need `read:rbac_groups`.
45* Group `POST` and `DELETE` endpoints need `write:rbac_groups`.
46 
47A key with the read-only `read:org_audit` scope can also call every `GET` endpoint on this page. See [Across several APIs](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#across-several-apis) on the Enterprise Admin API key scopes page.
48 
49For where to create the key, see [Create a key for a Claude Enterprise organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) on the Admin API keys and tokens page. For what each scope allows, see [Enterprise Admin API key scopes](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#admin-api-user-management). In a cURL request, pass the key in the `x-api-key` header, together with the `anthropic-version` header ([API versions](https://platform.claude.com/docs/en/api/versioning)).
50 
4051## Overview
4152 
4253This page covers five resources:
from line 64
5364 
5465## Quick start
5566 
56Set the `ANTHROPIC_API_KEY` environment variable to your Admin API key. The examples on this page read the key from it. The SDK and the `ant` CLI send the `Authorization` and `anthropic-version` headers for you.
67Set the `ANTHROPIC_API_KEY` environment variable to your Admin API key. The examples on this page read the key from it. The SDK and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) send the key and the `anthropic-version` header for you.
5768 
5869List the organization’s members, newest first:
5970 
from line 753
742753 
743754The request doesn’t end any of the following:
744755 
745* **API keys:** They keep working, including Admin API keys that the person created. To stop an Admin API key, delete it in the **Keys** section of [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access).
756* **API keys:** They keep working, including Admin API keys that the person created. To stop an Enterprise Admin API key, delete it in the **Keys** section of the [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**).
746757* **OAuth tokens for other organizations:** To end them, send the request in each organization with that organization’s key. The person has the same `id` in every organization. OAuth tokens issued to the person’s account and not to an organization also keep working, and this request can’t end them.
747* **Claude Code cloud sessions and routines:** Sessions that run on Anthropic’s infrastructure, such as Claude Code on the web, or in one of your [self-hosted environments](https://code.claude.com/docs/en/self-hosted-environments) keep running. Work in progress when you send the request, or started soon after, can fail. The session then gets new credentials without the person signing in again, and continues. The person’s [routines](https://code.claude.com/docs/en/routines) that run on a schedule or on GitHub events keep starting new sessions. The **Sign out everywhere** action leaves these running too.
758* **Claude Code cloud sessions and routines:** Sessions that run on Anthropic’s infrastructure or in one of your [self-hosted environments](https://code.claude.com/docs/en/self-hosted-environments) keep running. Work that’s in progress when you send the request or that starts soon after can fail, but the session continues. The person’s [routines](https://code.claude.com/docs/en/routines) that run on a schedule or on GitHub events keep starting new sessions. The **Sign out everywhere** action leaves these running too.
748759* **Computers linked to Cowork:** They stay linked.
749760* **A sign-in that is in progress:** One that’s already under way can finish during the request, or up to 5 minutes after it. If the [audit log export](https://platform.claude.com/docs/en/manage-claude/compliance-api#export-audit-logs) or [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) shows the person signing in after the request, send it again. Sign-ins to apps such as Claude Code aren’t recorded there, so if the person was signing in to one, send it again after 5 minutes.
750761 
from line 2171
21602171 
21612172## Custom roles
21622173 
2163Custom roles are read-only through the API: these endpoints catalog your organization’s custom roles (defined in [claude.ai organization settings](https://claude.ai/admin-settings) or provisioned by Anthropic) and the permissions each role grants. Custom-role reads use the `read:members` scope (there is no separate role scope) and work with an organization-level key, and the catalog returned is your organization’s own.
2174Custom roles are read-only through the API: these endpoints catalog your organization’s custom roles (defined in [claude.ai organization settings](https://claude.ai/admin-settings) or provisioned by Anthropic) and the permissions each role grants. Custom-role reads accept the `read:members` scope and work with an organization-level key, and the catalog returned is your organization’s own.
21642175 
21652176Read a role’s name from its `display_name` field. For a role provisioned by Anthropic, `display_name` can differ from the label claude.ai shows, and Anthropic might change the name. To keep a lasting reference to a role, store its `id`.
21662177 
from line 2690
26792690 
26802691### What happens to an Admin API key when the person who created it leaves?
26812692 
2682The key keeps working. Admin API keys are scoped to the organization, not to individual users, and a key created in claude.ai does not expire. Removing the creator from the organization or deprovisioning them through your identity provider ends their own access, but not the keys they created. Downgrading their role does not change the keys either: each key stays active with its original scopes. When you offboard someone who created Admin API keys, delete those keys in the **Keys** section of [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access) and create replacements.
2693The key keeps working. Admin API keys belong to the organization, not to individual users, and a key created in claude.ai does not expire. Removing the creator from the organization or deprovisioning them through your identity provider ends their own access, but not the keys they created. Downgrading their role does not change the keys either: each key stays active with its original scopes.
26832694 
2695A key’s secret still works for anyone who has a copy. When you offboard someone who created Admin API keys, create replacement keys and switch your integrations to them, as [Replace an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#replace-an-admin-api-key) describes. Then delete the old keys in the **Keys** section of the [API settings](https://claude.ai/admin-settings/api-access) page in claude.ai (**Organization settings** > **API**).
2696 
26842697## See also
26852698 
26862699<CardGroup cols={2}>
2687 <Card title="Create an Admin API key" href="https://platform.claude.com/docs/en/manage-claude/admin-api-keys">
2688 Where to create a scoped key and which scopes to select.
2700 <Card title="Admin API keys and tokens" href="https://platform.claude.com/docs/en/manage-claude/admin-api-keys">
2701 Where to create an Enterprise Admin API key and which scopes to select.
26892702 </Card>
26902703 
26912704 <Card title="Compliance API" href="https://platform.claude.com/docs/en/manage-claude/compliance-api">

manage-claude/user-profiles-verification-portal Changed · +50 / -39 lines

## After the end customer links the user profile ## Link an AWS account or Google Cloud project ## After the end customer links the profile

from line 1
11---
22title: Send an end customer a link to the Verification Portal
33url: https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal
4description: Create an enrollment link for a user profile, see what your end customer does in the Verification Portal, and check which programs apply to the profile afterward.
4description: Send an end customer a Verification Portal link so a program they're approved for, such as the Cyber Verification Program, can apply through your platform.
55---
66 
7Anthropic runs programs that an organization can apply to in the Verification Portal. For an end customer’s approvals to apply when they use Claude through your platform, the end customer links their user profile to their own Anthropic organization in the portal. You start the process: create an enrollment link for the profile and give it to the end customer.
7Anthropic runs programs that give approved organizations more access. For example, the [Cyber Verification Program](https://support.claude.com/en/articles/14604842) lets vetted security teams work with reduced cyber safeguards. An end customer can use a program through your platform if their own organization is approved. You create an enrollment link for their user profile and give it to them. They then link the user profile to their own Anthropic organization in the Verification Portal, where organizations apply to programs. On some cloud platforms, you also have to [link your cloud accounts](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#link-an-aws-account-or-google-cloud-project).
88 
9A user profile tells Anthropic which of your end customers each API request is for. You create one for each end customer and send its `uprof_` ID on every request you make for them. The profile must exist before you can create a link for it. To create one, see [User profiles for end-customer attribution](https://platform.claude.com/docs/en/manage-claude/user-profiles).
9A [user profile](https://platform.claude.com/docs/en/manage-claude/user-profiles) tells Anthropic which of your end customers each API request is for. You send its ID on every request you make for that end customer. The user profile must exist before you can create a link for it. To create one, see [Create user profiles and attribute requests](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests).
1010 
11You can skip this page if you need only attribution, or if creating enrollment links isn’t enabled for your organization.
11You can skip creating an enrollment link if none of your end customers needs an Anthropic program through your platform. You can also skip it if creating enrollment links isn’t enabled for your organization.
1212 
1313## Create the link
1414 
15To create an enrollment link for a profile, call [`POST /v1/user_profiles/{id}/action_urls`](https://platform.claude.com/docs/en/api/user_profiles/action_urls/create) with the profile’s ID in the path. In the request body, set `action.type` to `enroll_end_user`.
15To create an enrollment link for a user profile, call [`POST /v1/user_profiles/{id}/action_urls`](https://platform.claude.com/docs/en/api/user_profiles/action_urls/create) with the user profile’s ID in the path. In the request body, set `action.type` to `enroll_end_user`.
1616 
17The call returns a `404` if creating enrollment links isn’t enabled for your organization. That’s the same status as for a profile ID it can’t find, so check the ID first.
18 
1917<CodeGroup>
2018 ```bash cURL
2119 curl https://api.anthropic.com/v1/user_profiles/uprof_011CZkZCu8hGbp5mYRQgUmz9/action_urls \
from line 133
135133}
136134```
137135 
138The link works until the time in `expires_at`, about an hour after you create it. Create it when the end customer asks for it, for example when they click a button in your product, not ahead of time in an email they might read later. They can open the link more than once until it expires. If it has expired, create a new one: each call returns a fresh link. Creating a new link doesn’t cancel earlier ones.
136The link works until the time in `expires_at`, about an hour after you create it. Create it when the end customer asks for it, such as when they click a button in your product. Don’t create it ahead of time and send it in an email they might read later. They can open the link more than once until it expires. If it has expired, create a new one: each call returns a fresh link. Creating a new link doesn’t cancel earlier ones.
139137 
140Anyone who has the link can use it until it expires, so give it only to the end customer it’s for. Send it to an admin or owner of the end customer’s Anthropic organization, because only an admin or owner can link a profile. Don’t parse the URL or build one yourself. Its format can change.
138Anyone who has the link can use it until it expires, so give it only to the end customer it’s for. Send it to an admin or owner of the end customer’s Anthropic organization, because only an admin or owner can link a user profile. Don’t parse the URL or build one yourself. Its format can change.
141139 
140The call returns a `404` if creating enrollment links isn’t enabled for your organization. That’s the same status as for a user profile ID it can’t find, so check the ID first.
141 
142142If you’re using Claude Platform on AWS, create the link with `POST /v1/user_profiles/{id}/enrollment_url` instead, and send the `anthropic-beta: user-profiles-2026-08-18` header. That request takes no body, and the response has the same `url` and `expires_at` fields. In the SDK and the CLI, that call is in the beta namespace: `client.beta.user_profiles.create_enrollment_url()` (typescript: `client.beta.userProfiles.createEnrollmentURL()`; csharp: `client.Beta.UserProfiles.CreateEnrollmentUrl()`; go: `client.Beta.UserProfiles.NewEnrollmentURL()`; java: `client.beta().userProfiles().createEnrollmentUrl()`; php: `$client->beta->userProfiles->createEnrollmentURL()`; cli: `ant beta:user-profiles create-enrollment-url`).
143143 
144If your inference runs on a Microsoft Foundry deployment hosted on Anthropic, create the link from the organization on the Claude API that created the profile. `POST /v1/user_profiles/{id}/action_urls` is not available on Microsoft Foundry.
144If you use a Microsoft Foundry deployment hosted on Anthropic, create the link from the Claude API organization that created the user profile. `POST /v1/user_profiles/{id}/action_urls` is not available on Microsoft Foundry.
145145 
146146## What the end customer sees
147147 
148The link opens Anthropic’s Verification Portal at `portal.anthropic.com`. After the end customer logs in, the portal shows them the name of your Anthropic organization and the profile’s ID.
148The link opens Anthropic’s Verification Portal at `portal.anthropic.com`. After the end customer logs in, the portal shows them the name of your Anthropic organization and the user profile’s ID.
149149 
150150<Steps>
151151 <Step title="Log in">
152 The end customer logs in with an Anthropic account: one they already use for the Claude Console or claude.ai, or a new one that they create at this step. The portal keeps its own login session, separate from the Claude Console and claude.ai. If they belong to more than one organization, they pick the one to link.
152 The end customer logs in with an Anthropic account. If they don’t already have one for the Claude Console or claude.ai, they create one at this step. The portal keeps its own login session, separate from the Claude Console and claude.ai. If they belong to more than one organization, they pick the one to link.
153153 
154154 <Frame caption="Before logging in, the end customer sees why they were sent to the portal.">
155155 ![Verification Portal card titled Link your account to apply for trusted access, with a Continue to log in button.](https://platform.claude.com/docs/images/user-profiles/portal-log-in.png)
from line 156
156156 </Frame>
157157 </Step>
158158 
159 <Step title="Link the profile">
160 The portal shows a card titled **Link your partner profile**. It names your platform, the profile’s ID, the end customer’s organization, and when the invitation expires. The end customer selects **Link profile** to accept or **Skip for now** to continue to the portal without linking.
159 <Step title="Link the user profile">
160 The portal shows a card titled **Link your partner profile**. It names your platform, the user profile’s ID, the end customer’s organization, and when the invitation expires. The end customer selects **Link profile** to accept or **Skip for now** to continue to the portal without linking.
161161 
162 <Frame caption="The end customer confirms which organization the profile links to.">
162 <Frame caption="The end customer confirms which organization the user profile links to.">
163163 ![Verification Portal card titled Link your partner profile, with the partner, profile ID, organization, and expiry shown.](https://platform.claude.com/docs/images/user-profiles/portal-link-profile.png)
164164 </Frame>
165165 
166 Only an admin or owner of the organization can link a profile. Anyone else sees **Admin access needed** and can’t link the profile. They can switch to an organization where they are an admin or owner. Otherwise, tell the end customer that an admin or owner of their Anthropic organization has to open the link.
166 Only an admin or owner of the organization can link a user profile. Anyone else sees **Admin access needed** and can’t link it. They can switch to an organization where they are an admin or owner. Otherwise, tell the end customer that an admin or owner of their Anthropic organization has to open the link.
167167 </Step>
168168 
169169 <Step title="See the confirmation">
from line 175
175175 </Step>
176176</Steps>
177177 
178If the link has expired by the time an admin or owner opens it and logs in, the portal shows **This invitation has expired** and tells them to ask you for a new one.
178If the link expires before an admin or owner opens it and logs in, the portal shows **This invitation has expired**. It also tells them to ask you for a new one.
179179 
180A profile links to one organization. If it’s already linked to a different one, the portal says **This partner profile is already linked to a different organization** and doesn’t link it. An admin or owner of the organization it’s linked to can unlink it under **Linked accounts** in the portal. After that, create a new link and send it to the end customer.
180A user profile links to one organization. If it’s already linked to a different one, the portal says **This partner profile is already linked to a different organization** and doesn’t link it. An admin or owner of the organization it’s linked to can unlink it under **Linked accounts** in the portal. After that, create a new link and send it to the end customer.
181181 
182## After the end customer links the profile
182## After the end customer links the user profile
183183 
184The portal doesn’t send the end customer back to your product, and Anthropic doesn’t notify you. Tell the end customer in your own interface to return when they have finished.
184The portal doesn’t send the end customer back to your product, and Anthropic doesn’t tell you that the user profile was linked. Tell the end customer in your own interface to return when they have finished.
185185 
186Linking doesn’t approve anything by itself. It connects the profile to the end customer’s organization, so that programs the organization is approved for apply to requests that carry the profile’s ID, except Cyber Verification Program access levels, which the end customer turns on for each linked profile in the portal. The profile has no field that says it is linked.
186Linking doesn’t approve anything by itself. It connects the user profile to the end customer’s organization. Programs the organization is approved for then apply to requests that carry the user profile’s ID. The exception is Cyber Verification Program access levels. The end customer turns them on for each linked user profile on the program’s page in the portal. A level applies only where Anthropic allows it for your platform. The user profile has no field that says it is linked.
187187 
188To see which programs apply to a profile, [retrieve the profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve) and read `programs`. It has a key for each program, such as `cyber`, and every profile has every key. Each key is one of the following:
188To see which programs apply to a user profile, [retrieve the user profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve) and read `programs`. It has a key for each program, such as `cyber`, and every user profile has every key. Each key’s value is one of the following:
189189 
190190* `null`: Anthropic has no status to report for that program. Every key is `null` if Anthropic hasn’t enabled programs for your organization.
191* An object: Its `status` is `active` when the program applies to the profile, otherwise `pending` or `rejected`.
191* An object: Its `status` is `active` when the program applies to the user profile, otherwise `pending` or `rejected`.
192192 
193The end customer can see the linked profile under **Linked accounts** in the portal.
193The end customer can see the linked user profile under **Linked accounts** in the portal.
194194 
195If your inference runs on Claude Models on Google Cloud (Google managed) or Amazon Bedrock, you have to link your own accounts too. Programs apply to requests from an AWS account or Google Cloud project only after you link it to the Anthropic organization that creates your profiles. On Amazon Bedrock, only some models accept a profile ID. See [Attribute requests on Claude Models on Google Cloud (Google managed) and Amazon Bedrock](https://platform.claude.com/docs/en/manage-claude/user-profiles#attribute-requests-on-amazon-bedrock-and-google-cloud).
195## Link an AWS account or Google Cloud project
196196 
197If you send user profile IDs to Claude Models on Google Cloud (Google managed) or Amazon Bedrock, you have to link your cloud accounts too. On these two platforms, [programs that apply to a user profile](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#after-the-end-customer-links-the-profile) take effect only on requests from a linked AWS account or Google Cloud project. What you link depends on the platform:
198 
199* **Claude Models on Google Cloud (Google managed):** Link each Google Cloud project that sends requests with user profile IDs to this platform. You don’t need to link a project you use only for your own usage.
200* **Amazon Bedrock:** Link each AWS account that sends requests with user profile IDs to this platform. You don’t need to link an account you use only for your own usage.
201 
202Linking an account or project has these steps:
203 
2041. An admin or owner of the organization that creates your user profiles goes to **Linked accounts** in Anthropic’s Verification Portal at `portal.anthropic.com`. There, they start linking the account or project.
2052. Someone who can manage IAM in the AWS account or Google Cloud project follows the instructions that the portal provides.
2063. An admin or owner of the organization that creates your user profiles completes the verification in the portal. The link is complete when the portal shows the account or project as **Linked**.
207 
197208## Next steps
198209 
199For each field that a retrieved profile contains, see the [Retrieve a profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve) reference.
210For each field that a retrieved user profile contains, see the [Retrieve a user profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve) reference.
200211 
201To create profiles, send their IDs on your requests, and keep them current, see [User profiles for end-customer attribution](https://platform.claude.com/docs/en/manage-claude/user-profiles).
212To create user profiles and send their IDs on your requests, see [Create user profiles and attribute requests](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests). To keep them current, see [Manage user profiles](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles). On a cloud platform, see [Use user profiles on a cloud platform](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms).
202213 

manage-claude/user-profiles/attribute-requests New page · 404 lines, new page

## Before you begin ## Decide who gets a user profile ## Create a user profile for each end customer ### What to tell Anthropic about an end customer ### Send the create request ### Register an existing customer base ## Attribute each request ### Identify one person within a company ## Rules and special cases ### If a workspace has a user profile attached ### If a request returns a `400` ### If you send a batch

A whole new page. There's nothing to diff it against, so here is what it says.

---
title: Create user profiles and attribute requests
url: https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests
description: Create a user profile for each end customer and send its ID on every request for them. A safety restriction or ban can then apply to that one end customer.
---

User profiles tell Anthropic which of your end customers each API request is for. That way, a safety enforcement action, such as a restriction or a ban, can apply to one end customer instead of your whole organization. If you aren’t sure that you need user profiles, see [How user profiles work](https://platform.claude.com/docs/en/manage-claude/user-profiles/how-user-profiles-work).

If you write the code that serves your end customers, you create a user profile for each one with `POST /v1/user_profiles`. You keep the opaque `uprof_` ID it returns and send it on every request you make for them.

If you use Claude through a cloud platform, that platform determines which organization holds your user profiles and how you send their IDs. Read [Use user profiles on a cloud platform](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms) before you create your first user profile.

## Before you begin

You need the following:

* **An organization for end-customer traffic:** Keep it separate from the one for your own usage. Separate workspaces in the same organization aren’t enough. Only the organization for end-customer traffic needs user profiles. To create another organization on the Claude API, see “How to create a new organization” in [Create and manage Workspaces in the Claude Console](https://support.claude.com/en/articles/9796807).
* **Credentials for that organization:** To create and manage user profiles, use a [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) or OAuth token with the `workspace:developer` scope, or an API key. A workload identity federation token is a short-lived Anthropic token that you get in exchange for one from your own identity provider. If the credential belongs to a person, they need the developer, admin, or owner role in the organization, because a workspace role isn’t enough. If it belongs to a service account, the developer or admin role in the organization or the workspace works. To send user profile IDs, any credential from that organization that can call the Messages API works. You don’t need an Admin API key.
* **On a Microsoft Foundry deployment hosted on Anthropic, a linked organization:** Anthropic has to link the organization that holds your Foundry resource to the one that holds your user profiles. Until then, your Foundry requests can’t carry user profile IDs. See [If you use Microsoft Foundry](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#microsoft-foundry).

## Decide who gets a user profile

Each end customer gets one user profile, so a company gets a single one rather than one for each person in it. Send its ID on every request you make for anyone at the company. To also tell Anthropic which person a request comes from, see [Identify one person within a company](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#identify-individual-users-within-a-company).

The `access_type` you set depends on whether the end customer uses your product or buys API access from you, such as through your gateway:

| The end customer | `access_type` |
| ----- | ----- |
| Uses your product | `application` (the default, set when you leave `access_type` out) |
| Is a company that buys API access from you | `passthrough` (not the default, so you have to send it) |

Your own usage doesn’t need a user profile.

Don’t create a user profile for a workspace. A user profile belongs to your whole organization, so its ID works on requests through any workspace in the organization. The exception is [a workspace that has a different user profile attached](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-workspace-has-a-profile-attached). You can’t replace or remove that attachment.

## Create a user profile for each end customer

Create one user profile for each end customer before the first request that you send with its ID. Onboarding is a common place to do it. Because `POST /v1/user_profiles` isn’t idempotent, every call creates a new user profile, even when `reference_id` (your own ID for the end customer) matches an existing one. Store the ID it returns and reuse it.

If you already have end customers without user profiles, see the [guidance on registering an existing customer base](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#register-existing-end-customers) later in this section.

### What to tell Anthropic about an end customer

Every field is optional, except that an end customer who buys API access from you needs `access_type` set to `passthrough`. Besides `access_type`, you can send `name`, `metadata`, and these fields in `external_user_details`: `entity_type`, `country`, `reference_id`, `onboarded_at`, `account_status`, `name_hash`, and `email_hash`. For each field’s type, format, and length limit, see the [Create a user profile](https://platform.claude.com/docs/en/api/user_profiles/create) reference.

Follow these rules as you fill them in:

* **Names:** If you send `name`, use the end customer’s real-world name. For a company, that’s its legal name, if you know it.
* **Names you can’t share:** Leave out `name` and send `external_user_details.name_hash` instead.
* **Email addresses:** Send `external_user_details.email_hash`, because a user profile has no field for the address itself.
* **Hashes:** Compute the hashes yourself with a function you choose. They let Anthropic see which of your user profiles share a name or email address. Because only values computed the same way match, use the same function for every user profile and handle case and whitespace the same way.
* **Country:** `country` is the end customer’s country, not yours.
* **Your own ID:** `reference_id` takes your own stable identifier for the end customer, and it doesn’t have to be unique.
* **Health information:** Don’t include protected health information (PHI) in a user profile, because the user profiles API [isn’t a HIPAA-eligible service](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility).

For more, see [What a user profile contains and how Anthropic uses it](https://platform.claude.com/docs/en/manage-claude/user-profiles/how-user-profiles-work#what-a-profile-contains-and-how-anthropic-uses-it).

<Warning>
  If you don’t know a value, leave it out instead of sending a placeholder. You can replace a value in `external_user_details` later, but you can’t clear it.
</Warning>

### Send the create request

The cURL samples on this page send an access token from `ANTHROPIC_AUTH_TOKEN`, such as a [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#authenticate-from-your-workload) token. Set that variable only in the shell where you run them, because it takes precedence over federation environment variables and federation profiles.

This example creates a user profile for a company that buys API access from you, so it sets `access_type` to `passthrough`. For an `application` user profile, leave `access_type` out.

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/user_profiles \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
    -H "anthropic-version: 2026-10-21" \
    -H "content-type: application/json" \
    -d '{
      "name": "Acme Analytics, Inc.",
      "access_type": "passthrough",
      "external_user_details": {
        "reference_id": "cust-8f2a1c",
        "country": "US"
      }
    }'
  ```

  ```bash CLI
  ant user-profiles create \
    --name "Acme Analytics, Inc." \
    --access-type passthrough \
    --external-user-details '{reference_id: cust-8f2a1c, country: US}'
  ```

  ```python Python
  client = anthropic.Anthropic()

  profile = client.user_profiles.create(
      name="Acme Analytics, Inc.",
      access_type="passthrough",
      external_user_details={"reference_id": "cust-8f2a1c", "country": "US"},
  )

  print(profile.id)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const profile = await client.userProfiles.create({
    name: "Acme Analytics, Inc.",
    access_type: "passthrough",
    external_user_details: { reference_id: "cust-8f2a1c", country: "US" }
  });

  console.log(profile.id);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var profile = await client.UserProfiles.Create(new()
  {
      Name = "Acme Analytics, Inc.",
      AccessType = UserProfileAccessType.Passthrough,
      ExternalUserDetails = new()
      {
          ReferenceID = "cust-8f2a1c",
          Country = "US"
      }
  });

  Console.WriteLine(profile.ID);
  ```

  ```go Go
  client := anthropic.NewClient()

  profile, err := client.UserProfiles.New(context.Background(), anthropic.UserProfileNewParams{
  	Name:       anthropic.String("Acme Analytics, Inc."),
  	AccessType: anthropic.UserProfileAccessTypePassthrough,
  	ExternalUserDetails: anthropic.UserProfileExternalUserDetailsParams{
  		ReferenceID: anthropic.String("cust-8f2a1c"),
  		Country:     anthropic.String("US"),
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(profile.ID)
  ```

  ```java Java
  import com.anthropic.models.userprofiles.UserProfileAccessType;
  import com.anthropic.models.userprofiles.UserProfileCreateParams;
  import com.anthropic.models.userprofiles.UserProfileExternalUserDetailsParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = UserProfileCreateParams.builder()
          .name("Acme Analytics, Inc.")
          .accessType(UserProfileAccessType.PASSTHROUGH)
          .externalUserDetails(UserProfileExternalUserDetailsParams.builder()
              .referenceId("cust-8f2a1c")
              .country("US")
              .build())
          .build();
      var profile = client.userProfiles().create(params);

      IO.println(profile.id());
      // ...
  }
  ```

  ```php PHP
  $client = new Client();

  $profile = $client->userProfiles->create(
      name: 'Acme Analytics, Inc.',
      accessType: 'passthrough',
      externalUserDetails: ['referenceID' => 'cust-8f2a1c', 'country' => 'US'],
  );

  echo $profile->id, PHP_EOL;
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  profile = client.user_profiles.create(
    name: "Acme Analytics, Inc.",
    access_type: :passthrough,
    external_user_details: { reference_id: "cust-8f2a1c", country: "US" }
  )

  puts profile.id
  ```
</CodeGroup>

You get the new user profile back, abridged here:

```json
{
  "type": "user_profile",
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "name": "Acme Analytics, Inc.",
  "access_type": "passthrough",
  "external_user_details": {
    "reference_id": "cust-8f2a1c",
    "onboarded_at": null,
    "account_status": null,
    "entity_type": null,
    "country": "US",
    "name_hash": null,
    "email_hash": null
  },
  "metadata": {},
  "programs": {
    "cyber": null
  },
  "enforcement_status": "unrestricted",
  "enforcement_actions": [],
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}
```

Store the `id` on your customer record and have your service instances read it from there, rather than each creating its own user profile. It’s also the ID you use to retrieve, update, or delete the user profile later.

Anthropic sets the following fields itself, so leave them out of your request:

* `programs`: The end customer’s status in each Anthropic program, such as the Cyber Verification Program. Attribution doesn’t use this field. For what its values mean, see [which programs apply to a user profile](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#after-the-end-customer-links-the-profile).
* `enforcement_status` and `enforcement_actions`: Restrictions or bans that Anthropic has open on the end customer. See [Check whether Anthropic has restricted or banned a user profile](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#check-whether-anthropic-has-restricted-or-banned-a-profile).

### Register an existing customer base

An organization can hold any number of user profiles, but creating them is rate limited. Before you register an existing customer base in bulk, contact your Anthropic account team.

## Attribute each request

Send the user profile’s `uprof_` ID, not your own ID for the end customer, in the `anthropic-user-profile-id` header on every request you make for them. The SDK and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) add the header for you when you set `user_profile_id` (java: `.userProfileId()`; php: `userProfileID`; csharp, go: `UserProfileID`; cli: `--user-profile-id`).

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
    -H "anthropic-version: 2026-10-21" \
    -H "anthropic-user-profile-id: $PROFILE_ID" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 1024,
      "messages": [
        {"role": "user", "content": "Hello, Claude"}
      ]
    }'
  ```

  ```bash CLI
  ant messages create \
    --model claude-opus-5-5 \
    --max-tokens 1024 \
    --message '{role: user, content: "Hello, Claude"}' \
    --user-profile-id "$PROFILE_ID"
  ```

  ```python Python
  client = anthropic.Anthropic()

  message = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[{"role": "user", "content": "Hello, Claude"}],
      user_profile_id=profile_id,
  )

  print(message)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const message = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [{ role: "user", content: "Hello, Claude" }],
    user_profile_id: profileId
  });

  console.log(message);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var parameters = new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages = [new UserMessageParam { Content = "Hello, Claude" }],
      UserProfileID = profileId
  };

Cut at 300 lines. The page has the rest.

manage-claude/user-profiles/how-user-profiles-work New page · 56 lines, new page

## How it works ### What a user profile contains and how Anthropic uses it ## When to use it

A whole new page. There's nothing to diff it against, so here is what it says.

---
title: How user profiles work
url: https://platform.claude.com/docs/en/manage-claude/user-profiles/how-user-profiles-work
description: A user profile tells Anthropic which of your customers a request to Claude is for. Learn why that matters and when you need one.
---

A user profile tells Anthropic which of your customers a request to Claude is for, whether that’s a person or a company. It matters when your customers (“end customers”) use Claude through your product or platform, because their requests arrive under your organization. With a user profile for each end customer, a safety restriction or ban can apply to that one end customer instead of your whole organization.

## How it works

Suppose your platform serves two companies through your organization. You create a user profile for each and send that user profile’s ID on the company’s requests. If one company’s requests lead to a safety enforcement action, such as a [restriction or a ban](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#check-whether-anthropic-has-restricted-or-banned-a-profile), it can apply to that company’s user profile. When it does, the other company’s requests are unaffected.

Without user profiles, all of those requests arrive under your organization, and at most a free-text [`metadata.user_id`](https://platform.claude.com/docs/en/api/messages/create) tells them apart. Anthropic runs automated safety classifiers over API traffic, so one end customer can then trigger an enforcement action that applies to your whole organization.

You create a user profile once for each end customer, and Anthropic gives it an opaque ID that holds none of the details you provide. You send that ID on every request you make for that end customer. Any details you add, such as a name or metadata, are optional. To start, see [Create user profiles and attribute requests](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests).

On their own, user profiles don’t change billing or pricing. If you use [Linked billing](https://platform.claude.com/docs/en/manage-claude/oauth-apps/linked-billing), a user profile is also how you identify the customer to bill.

### What a user profile contains and how Anthropic uses it

A user profile contains only what you send about the end customer, plus any [program status](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#after-the-end-customer-links-the-profile) or enforcement status that Anthropic sets. It doesn’t contain conversation content. Anthropic uses the details you send to attribute requests, to monitor for abuse, for enforcement of the [Usage Policy](https://www.anthropic.com/legal/aup), and to enable application and access to trusted access programs. Anthropic doesn’t verify the details.

Anthropic processes user profiles in accordance with the [Privacy Policy](https://www.anthropic.com/legal/privacy). The [feature eligibility tables](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility) cover how long Anthropic keeps user profile data.

How much you send is up to you. For example, this [`POST /v1/user_profiles`](https://platform.claude.com/docs/en/api/user_profiles/create) request sends only the end customer’s name:

```json
{
  "name": "Ana García"
}
```

Every field is optional, so you can send an empty JSON object, `{}`, instead. Without an `access_type`, the request makes an [`application` user profile](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#decide-who-gets-a-profile) for an end customer who uses your product. A fuller request adds other details:

```json
{
  "name": "Ana García",
  "external_user_details": {
    "entity_type": "individual",
    "country": "ES",
    "reference_id": "user-4821",
    "onboarded_at": "2026-03-15T10:00:00Z",
    "account_status": "active",
    "email_hash": "8fac453d04351152e705c17d1ce2a0f079400e2a0edf662e97d803427fd608c9"
  },
  "metadata": {
    "plan": "pro"
  }
}
```

Each of these returns the user profile with its `uprof_` ID, as in the [example response](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#send-the-create-request). For the rules on these fields, see [What to tell Anthropic about an end customer](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#what-to-tell-anthropic-about-an-end-customer).

## When to use it

Use user profiles if you operate a platform, operate a gateway, or resell API access. The requests you send for your end customers arrive under your organization. Your own usage doesn’t need a user profile.

manage-claude/user-profiles/manage-profiles New page · 338 lines, new page

## Before you begin ## Check whether Anthropic has restricted or banned a user profile ### Find user profiles that have an open action ### Read the enforcement fields ## Update a user profile ## Delete a user profile ## Rules and special cases ### If a field has a value that you don’t recognize ### If the enforcement fields are missing ### If you use Claude Platform on AWS

A whole new page. There's nothing to diff it against, so here is what it says.

---
title: Manage user profiles
url: https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles
description: Check whether Anthropic has restricted or banned one of your end customers, update a user profile when the end customer's details change, and delete a user profile.
---

After you [create a user profile for each end customer](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#create-a-profile-for-each-end-customer), you can check whether Anthropic has restricted or banned any of them. You can also update a user profile when an end customer’s details change. You can delete the user profile when they leave or ask you to erase their data.

## Before you begin

You need two things:

* **The user profile’s ID:** The `uprof_` ID you stored when you created the user profile. The examples on this page read it from a variable.
* **Credentials for the organization that created the user profile:** Use the ones you created the user profile with (see [Create user profiles and attribute requests](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#before-you-begin)).

## Check whether Anthropic has restricted or banned a user profile

Anthropic can restrict or ban one of your end customers. An enforcement action (“action”) is a restriction or a ban on that end customer’s user profile. While an action is open, Anthropic refuses some or all inference requests that carry the user profile’s ID. Your other end customers’ requests aren’t affected.

* **A restriction** limits how Anthropic serves the end customer until it ends, and some of their requests might still succeed.
* **A ban** means that Anthropic has stopped serving the end customer where the ban applies and doesn’t plan to serve them there again. It has no end date, and they can’t clear it.

### Find user profiles that have an open action

There are two ways to check:

* **One user profile:** Retrieve it with [`GET /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/retrieve).
* **Every user profile that has an open action:** [List your user profiles](https://platform.claude.com/docs/en/api/user_profiles/list) with `enforcement_status[]=restricted` and `enforcement_status[]=banned`.

A list response might hold no user profiles or fewer than `limit` before the list ends, so keep requesting pages until `next_page` is `null`.

To find out when an action opens or ends, list your user profiles at regular intervals. Compare `enforcement_status` and `enforcement_actions` with what you saw last time. If a user profile drops out of the list, it either has no open action or was deleted. Don’t rely on `updated_at` to spot a change, because changes to these fields don’t reliably update it.

Anthropic doesn’t send webhook events for these changes.

### Read the enforcement fields

Each user profile in a create, retrieve, update, or list response carries two fields, `enforcement_status` and `enforcement_actions`. If a response has neither, see [If the enforcement fields are missing](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-the-enforcement-fields-are-missing). On Claude Platform on AWS, the fields don’t report actions (see [If you use Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-you-use-claude-platform-on-aws)).

Anthropic sets both fields, so if a create or update request includes either one, the API returns a `400`.

The following example shows these two fields on a retrieved user profile and leaves out most of its other fields:

```json
{
  "type": "user_profile",
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "enforcement_status": "restricted",
  "enforcement_actions": [
    {
      "type": "restriction",
      "id": "enac_011CZkZEq4TnWb7xLfRgPm2v",
      "reason": "fraud_or_abuse",
      "action": null,
      "opened_at": "2026-10-02T19:30:00Z",
      "expires_at": null
    }
  ]
}
```

`enforcement_status` summarizes the open actions in one value:

* `unrestricted`: No action is open.
* `restricted`: At least one action is open and none of them is a ban.
* `banned`: A ban is open.

`enforcement_status` is separate from `external_user_details.account_status`, which records your own decision about the account.

`enforcement_actions` lists the open actions and is empty when there are none. An action drops off the list once it ends, so if you need a history, store the actions you read. Each action has these fields:

* `type`: `restriction` or `ban`.
* `id`: The action’s ID, which starts with `enac_`.
* `reason`: Why Anthropic opened the action. It’s one of `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise`, or `unspecified`.
* `action`: What the end customer can do to clear the action. It’s always `null`.
* `opened_at`: When Anthropic opened the action.
* `expires_at`: When the action ends by itself. It’s `null` when the action has no end date.

Anthropic can add values to these fields, so make sure your code can handle [a value it doesn’t recognize](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-a-field-has-a-value-that-you-dont-recognize).

## Update a user profile

Update a user profile when the end customer’s details or account status change, for example when a company rebrands or you suspend an account. [`POST /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/update) changes only the fields you send:

* `name` and [`access_type`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#decide-who-gets-a-profile) replace the stored value.
* Each field you send in [`external_user_details`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#what-to-tell-anthropic-about-an-end-customer) replaces the stored value. You can’t clear a value, because the API rejects `null` with a `400`.
* `metadata` merges key by key. A key you send overwrites its stored value, an empty string deletes the key, and any key you leave out stays as it is.

The cURL samples on this page send an access token, such as a [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#authenticate-from-your-workload) token, from `ANTHROPIC_AUTH_TOKEN`. Because that variable takes precedence over federation environment variables and federation profiles, set it only in the shell where you run the samples.

The following example marks the account as suspended and deletes a `trial_cohort` metadata key:

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
    -H "anthropic-version: 2026-10-21" \
    -H "content-type: application/json" \
    -d '{
      "external_user_details": {"account_status": "suspended"},
      "metadata": {"trial_cohort": ""}
    }'
  ```

  ```bash CLI
  ant user-profiles update \
    --user-profile-id "$PROFILE_ID" \
    --external-user-details '{account_status: suspended}' \
    --metadata '{trial_cohort: ""}'
  ```

  ```python Python
  client = anthropic.Anthropic()

  profile = client.user_profiles.update(
      profile_id,
      external_user_details={"account_status": "suspended"},
      metadata={"trial_cohort": ""},
  )

  print(profile)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const profile = await client.userProfiles.update(profileId, {
    external_user_details: { account_status: "suspended" },
    metadata: { trial_cohort: "" }
  });

  console.log(profile);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var profile = await client.UserProfiles.Update(profileId, new()
  {
      ExternalUserDetails = new()
      {
          AccountStatus = UserProfileExternalUserAccountStatus.Suspended
      },
      Metadata = new Dictionary<string, string> { ["trial_cohort"] = "" }
  });

  Console.WriteLine(profile);
  ```

  ```go Go
  client := anthropic.NewClient()

  profile, err := client.UserProfiles.Update(
  	context.Background(),
  	profileID,
  	anthropic.UserProfileUpdateParams{
  		ExternalUserDetails: anthropic.UserProfileExternalUserDetailsParams{
  			AccountStatus: anthropic.UserProfileExternalUserAccountStatusSuspended,
  		},
  		Metadata: map[string]string{"trial_cohort": ""},
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(profile)
  ```

  ```java Java
  import com.anthropic.core.JsonValue;
  import com.anthropic.models.userprofiles.UserProfileExternalUserAccountStatus;
  import com.anthropic.models.userprofiles.UserProfileExternalUserDetailsParams;
  import com.anthropic.models.userprofiles.UserProfileUpdateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = UserProfileUpdateParams.builder()
          .userProfileId(profileId)
          .externalUserDetails(UserProfileExternalUserDetailsParams.builder()
              .accountStatus(UserProfileExternalUserAccountStatus.SUSPENDED)
              .build())
          .metadata(UserProfileUpdateParams.Metadata.builder()
              .putAdditionalProperty("trial_cohort", JsonValue.from(""))
              .build())
          .build();
      var profile = client.userProfiles().update(params);

      IO.println(profile);
  }
  ```

  ```php PHP
  $client = new Client();

  $profile = $client->userProfiles->update(
      $profileId,
      externalUserDetails: ['accountStatus' => 'suspended'],
      metadata: ['trial_cohort' => ''],
  );

  echo json_encode($profile, JSON_PRETTY_PRINT), PHP_EOL;
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  profile = client.user_profiles.update(
    profile_id,
    external_user_details: { account_status: :suspended },
    metadata: { trial_cohort: "" }
  )

  puts profile
  ```
</CodeGroup>

## Delete a user profile

[`DELETE /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/delete) deletes a user profile and the details you supplied for it, including `name`, `external_user_details`, and `metadata`. It doesn’t remove the trust and safety records that Anthropic keeps about that user profile ID. You can delete user profiles on the Claude API and Claude Platform on AWS.

Delete a user profile when an end customer closes their account or asks you to erase their data:

* **The customer leaves:** Stop sending the user profile’s ID on their requests, and then delete the user profile.
* **The customer stays with you after an erasure request:** Create a new user profile, switch their requests to its ID, and then delete the old user profile.

If the customer stays and a workspace has the old user profile attached, that workspace rejects requests that carry the new ID. Before you switch, see [If a workspace has a user profile attached](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-workspace-has-a-profile-attached).

<Warning>
  You can’t undo a delete.
</Warning>

The following example deletes a user profile:

<CodeGroup>
  ```bash cURL
  curl -X DELETE "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
    -H "anthropic-version: 2026-10-21"
  ```

  ```bash CLI
  ant user-profiles delete --user-profile-id "$PROFILE_ID"
  ```

  ```python Python
  client = anthropic.Anthropic()

  deleted = client.user_profiles.delete(profile_id)

  print(deleted.id)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const deleted = await client.userProfiles.delete(profileId);

  console.log(deleted.id);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var deleted = await client.UserProfiles.Delete(profileId);

  Console.WriteLine(deleted.ID);
  ```

  ```go Go
  client := anthropic.NewClient()

  deleted, err := client.UserProfiles.Delete(
  	context.Background(),
  	profileID,
  	anthropic.UserProfileDeleteParams{},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(deleted.ID)
  ```

  ```java Java
  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var deleted = client.userProfiles().delete(profileId);

      IO.println(deleted.id());
  }
  ```

  ```php PHP
  $client = new Client();

  $deleted = $client->userProfiles->delete($profileId);

Cut at 300 lines. The page has the rest.

manage-claude/user-profiles/platforms New page · 99 lines, new page

## Which organization holds your user profiles ## If you use Amazon Bedrock ### Requests that can carry a user profile ID ### Send the ID in the request body ## If you use Claude Platform on AWS ## If you use Claude Models on Google Cloud (Anthropic managed) ## If you use Claude Models on Google Cloud (Google managed) ## If you use Microsoft Foundry ## Rules and special cases ### How each platform checks the ID

A whole new page. There's nothing to diff it against, so here is what it says.

---
title: Use user profiles on a cloud platform
url: https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms
description: Where to create user profiles, what to link first, and how to send a user profile ID on each cloud platform that offers Claude.
---

If you use Claude through a cloud platform, setting up user profiles depends on that platform. The platform determines which organization holds your user profiles, what you link to that organization first, and where each request carries a user profile’s ID. For what user profiles do and whether you need them, see [How user profiles work](https://platform.claude.com/docs/en/manage-claude/user-profiles/how-user-profiles-work). For who gets a user profile and how to create one, see [Create user profiles and attribute requests](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests).

## Which organization holds your user profiles

On Amazon Bedrock, Claude Models on Google Cloud (Google managed), and Microsoft Foundry, you create user profiles in an Anthropic organization on another platform. This is usually the Claude API. That organization’s credentials are only for managing user profiles, and your requests to Claude still use your cloud platform’s credentials. Each platform’s section says which organizations work.

On Claude Models on Google Cloud (Google managed) and Amazon Bedrock, either [access type](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#decide-who-gets-a-profile) works.

## If you use Amazon Bedrock

* **Where you create user profiles:** In an organization on the Claude API. An organization on Claude Platform on AWS works too, but its user profiles [don’t report restrictions or bans](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#claude-platform-on-aws).
* **What you link first:** Each AWS account that sends requests with user profile IDs to Amazon Bedrock. Link each one to the organization that creates your user profiles. For the steps, see [Link an AWS account or Google Cloud project](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#link-an-aws-account-or-google-cloud-project). You don’t need to link an account you use only for your own usage.
* **Where the ID goes:** In the `user_profile_id` field at the top level of the request body, not in the `anthropic-user-profile-id` header. Send it only on the [requests that can carry a user profile ID](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#amazon-bedrock-models). See [How each platform checks the ID](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#how-each-platform-checks-the-id).

### Requests that can carry a user profile ID

User profiles work on [Claude in Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and with `InvokeModel` on [Claude on Amazon Bedrock (`bedrock-runtime`)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), including streaming with `InvokeModelWithResponseStream`. Send a user profile ID only on requests for these models, though not every one of them is on both endpoints:

* Claude 4.7 and later models
* Claude Sonnet 4.6
* Claude Haiku 4.5

Leave the ID out of requests for any other model, because a request that carries it can fail with a `400`. Leave it out of Amazon Bedrock batch inference jobs as well.

Requests without the ID aren’t attributed to an end customer.

User profiles are not available with the `Converse` API. Use `InvokeModel` or the `bedrock-mantle` endpoint instead.

### Send the ID in the request body

Here’s where the ID goes in a `bedrock-mantle` body. For a `bedrock-runtime` body, see the last two items in the following list.

```json
{
  "model": "anthropic.claude-opus-5-5",
  "max_tokens": 1024,
  "user_profile_id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "messages": [{ "role": "user", "content": "Hello, Claude" }]
}
```

How the ID gets into the body depends on how you call Amazon Bedrock:

* **The standard SDK client:** Don’t send a user profile ID to Amazon Bedrock through the client you use for the Claude API. That client puts the ID in the header, whatever base URL you give it.

* **The SDK client for `bedrock-mantle`:** Use the latest version of [the `bedrock-mantle` client](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#install-an-sdk), which you create with `AnthropicBedrockMantle` (csharp: `AnthropicBedrockMantleClient`; go: `bedrock.NewMantleClient()`; java: `BedrockMantleBackend`; php: `MantleClient`; ruby: `Anthropic::BedrockMantleClient`). Pass the ID in the SDK’s [user profile argument](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#attribute-each-request), and the client puts it in the body.

* **The SDK client for `bedrock-runtime`:** If you call `InvokeModel` through `AnthropicBedrock` (csharp: `AnthropicBedrockClient`; go: `bedrock.WithLoadDefaultConfig()`; java: `BedrockBackend`; php: `Bedrock\Client`; ruby: `Anthropic::BedrockClient`), the [latest version of the SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/overview#latest-versions) puts the [user profile argument](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#attribute-each-request) in the request body for you. An earlier version doesn’t, so unless you add the ID yourself, the request isn’t attributed. In TypeScript and C#, the version that counts is the Bedrock package’s, `@anthropic-ai/bedrock-sdk` or `Anthropic.Bedrock`.

  On the API version that the latest SDK sends, `InvokeModel` requests can fail with a `400` for some models. These are the models numbered 4.6 or lower in the model table of [Claude on Amazon Bedrock (`bedrock-runtime`)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy). For these models, stay on the previous major version of the SDK. To install it, use the commands in [Install an SDK for accessing Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#install-an-sdk-for-accessing-bedrock).

  With an earlier version, add `user_profile_id` to the body of requests for [models that accept it](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#amazon-bedrock-models), using `extra_body` (ruby: `request_options: {extra_body: {...}}`; typescript: `body`; php: `extraBodyParams`; java: `.putAdditionalBodyProperty()`; go: `option.WithJSONSet()`; csharp: `MessageCreateParams.FromRawUnchecked()`). Leave the rest of the body as it is, because the SDK builds the URL from the body’s `model` and, if you stream, `stream: true`. In the TypeScript and C# SDKs, that option replaces the whole body, so include every field of the request along with `user_profile_id`.

* **`InvokeModel` called directly:** Put the model ID in the request’s URL (`modelId` in an AWS SDK) rather than the body. The body also needs an `anthropic_version` field, such as `"anthropic_version": "bedrock-2023-05-31"`.

If you start from an example in [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#making-requests), change its model to one that [accepts a user profile ID](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#amazon-bedrock-models).

## If you use Claude Platform on AWS

* **Where you create user profiles:** In your organization on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), using that platform’s base URL and authentication. The calling principal needs the [user profile IAM actions](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#user-profiles).
* **What you link first:** Nothing, if you create the user profiles in this organization. If another organization created them, see [If a request returns a `400`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-request-returns-a-400).
* **Where the ID goes:** In the `anthropic-user-profile-id` header, which the SDK’s [user profile argument](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#attribute-each-request) sets.
* **Restrictions and bans:** Not reported. For what the enforcement fields show instead, see [Manage user profiles on Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-you-use-claude-platform-on-aws).

## If you use Claude Models on Google Cloud (Anthropic managed)

* **Where you create user profiles:** In your organization on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), where you can create, retrieve, list, and update them. Authenticate with Google Cloud credentials, not an API key, and use the latest version of [the SDK client for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#install-an-sdk) or the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests).
* **What you link first:** Nothing, if you create the user profiles in this organization. If another organization created them, see [If a request returns a `400`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-request-returns-a-400).
* **Where the ID goes:** In the `anthropic-user-profile-id` header, which the SDK’s [user profile argument](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#attribute-each-request) sets.

## If you use Claude Models on Google Cloud (Google managed)

* **Where you create user profiles:** In an organization on the Claude API. An organization on Claude Platform on AWS works too, but its user profiles [don’t report restrictions or bans](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#claude-platform-on-aws).
* **What you link first:** Each Google Cloud project that sends requests with user profile IDs to [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). Link each one to the organization that creates your user profiles. For the steps, see [Link an AWS account or Google Cloud project](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal#link-an-aws-account-or-google-cloud-project). You don’t need to link a project you use only for your own usage.
* **Where the ID goes:** In the `anthropic-user-profile-id` header, not in the request body. See [How each platform checks the ID](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#how-each-platform-checks-the-id).

With an SDK, use the latest version of [the SDK client for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#install-an-sdk-for-accessing-vertex-ai), which you create with `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). Pass the ID in its [user profile argument](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#attribute-each-request), and the client sends the header.

## If you use Microsoft Foundry

The following details are for deployments of [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) [hosted on Anthropic](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options).

* **Where you create user profiles:** In an organization on the Claude API. The `/v1/user_profiles` endpoints are not available on Microsoft Foundry.
* **What you link first:** The organization that holds your Foundry resource. Anthropic links it to the organization that creates your user profiles. To request the link, contact your account team.
* **Where the ID goes:** In the `anthropic-user-profile-id` header once the link exists. Until then, every request that carries a user profile ID returns a `400`.

## Rules and special cases

### How each platform checks the ID

Some platforms check the ID on every request. For which ones, and what they return, see [If a request returns a `400`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-request-returns-a-400).

Claude Models on Google Cloud (Google managed) rejects a malformed ID with a `400`. So does Amazon Bedrock on the [requests that can carry a user profile ID](https://platform.claude.com/docs/en/manage-claude/user-profiles/platforms#amazon-bedrock-models). Both accept any well-formed ID. On these two platforms, a successful response doesn’t confirm that the ID matches one of your user profiles.

manage-claude/wif-reference Changed · +4 / -4 lines

from line 76
7676 
7777The SDK locates the configuration directory in this order:
7878 
791. `$ANTHROPIC_CONFIG_DIR`
802. `~/.config/anthropic` on Linux and macOS
813. `%APPDATA%\Anthropic` on Windows
791. `$ANTHROPIC_CONFIG_DIR`.
802. `~/.config/anthropic` on Linux and macOS.
813. `%APPDATA%\Anthropic` on Windows.
8282 
8383### Active profile
8484 
from line 95
9595| Path | Contents | Sensitivity |
9696| ----- | ----- | ----- |
9797| `<config_dir>/configs/<profile>.json` | `version`, the `authentication` block, `organization_id`, `workspace_id`, and `base_url`. | Non-secret. Safe to commit or build into an image. |
98| `<config_dir>/credentials/<profile>.json` | `version`, the cached `access_token`, `expires_at`, and (for interactive login) `refresh_token`. | Secret. The SDK writes this file with mode `0600`. |
98| `<config_dir>/credentials/<profile>.json` | `version`, the cached `access_token`, `expires_at`, and (for interactive sign-in) `refresh_token`. | Secret. The SDK writes this file with mode `0600`. |
9999 
100100Both the config file and the credentials file carry a top-level string `version` field in `major.minor` format, such as `"1.0"`. The SDK writes this field automatically. If you omit it when authoring a config by hand, the SDK treats the file as the current version.
101101 

manage-claude/workspaces Changed · +41 / -39 lines

from line 8
88 
99## How workspaces work
1010 
11Every organization has a **Default Workspace** that cannot be renamed, archived, or deleted. When you create additional workspaces, you can assign members, service accounts, API keys, and resource limits to each one.
11Every organization has a **default workspace** that cannot be renamed, archived, or deleted. It has no member list of its own, because access to it follows each member’s organization role. When you create additional workspaces, you can assign members, service accounts, Developer API keys, and resource limits to each one.
1212 
1313Key characteristics:
1414 
1515* **Workspace identifiers** use the `wrkspc_` prefix (for example, `wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ`).
1616 
17* **Maximum 1,000 workspaces** for each organization by default (archived workspaces and the Default Workspace don’t count). Creating a workspace at the limit returns a `400` error with the message `Workspace limit reached`. Contact your account team if you need more.
17* **Maximum 1,000 workspaces** for each organization by default (archived workspaces and the default workspace don’t count). Creating a workspace at the limit returns a `400` error with the message `Workspace limit reached`. Contact your account team if you need more.
1818 
19* **Default Workspace** has a `wrkspc_` ID like any other workspace:
19* **The default workspace** has a `wrkspc_` ID like any other workspace:
2020 
21 * API responses carry that ID in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) accepts it.
22 * [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) includes the Default Workspace only when you pass `include_default=true`.
21 * API responses carry that ID in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response). [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/update) accept it, but Update Workspace rejects a new name for the default workspace.
22 * [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) includes the default workspace only when you pass `include_default=true`.
2323 * The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) reports its usage and cost under that ID. The legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports show `null` for its `workspace_id`.
24 * For an API key bound to the Default Workspace, the key’s `scope` field carries that ID.
24 * For a Developer API key scoped to the default workspace, the key’s `scope` field carries that ID.
2525 
26* **API keys** can be scoped to a single workspace. In this case, they can only access resources within that workspace. Other API keys aren’t scoped to a workspace. With one of these keys, send a [workspace ID header](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) on each request to choose the workspace. The key’s user or service account must have access to that workspace. For the key types, see [API keys and resource scoping](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping).
26* **Developer API keys** are scoped to one workspace or to the organization. A key scoped to a workspace can only access resources within that workspace. With a key scoped to the organization, send a [workspace ID header](https://platform.claude.com/docs/en/manage-claude/api-keys#select-a-workspace) on each Claude API request to choose the workspace. For the key types, see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) on the Developer API keys page.
2727 
2828### Claude Code workspace
2929 
from line 126
1261263. Update the name or color and save your changes.
127127 
128128<Note>
129 The Default Workspace cannot be renamed or deleted.
129 The default workspace cannot be renamed, archived, or deleted.
130130</Note>
131131 
132132#### Add members to a workspace
from line 152
152152 
153153#### Archive a workspace
154154 
155To archive a workspace, open its **More actions** menu (three dots) and select **Archive workspace**. Archiving:
156 
157* Preserves historical data for reporting
158* Deactivates the workspace and archives every API key created for it
159* Cannot be undone
160 
161155<Warning>
162 Archiving a workspace archives every API key created for that workspace within seconds (they remain listed in the Admin API as archived), and keys that aren’t scoped to a workspace can no longer act in it. This action cannot be undone. If you archive the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace), members of your organization can no longer sign in to Claude Code through Console billing.
156 Archiving a workspace can’t be undone. Within seconds, it archives every Developer API key created for that workspace. Keys scoped to the organization can no longer act in the workspace.
163157</Warning>
164158 
159If you archive the Claude Code workspace, members of your organization can no longer sign in to Claude Code through Console billing. See this page’s [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace) section.
160 
161To archive a workspace, open its **More actions** menu (three dots) and select **Archive workspace**. Archiving deactivates the workspace and keeps its historical data for reporting.
162 
163The Admin API still lists the workspace’s keys, marked as archived.
164 
165165### Using the Admin API
166166 
167167Programmatically manage workspaces using the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api).
168168 
169<Note>
170 Admin API endpoints accept an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an `org:admin` OAuth token, or a personal or service account key that isn’t scoped to a specific workspace. Keys scoped to a single workspace, including [workspace keys](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping), don’t work there. See [Admin API authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
171</Note>
169<Check>
170 **Admin API credentials required.** These endpoints are part of the Admin API.
171</Check>
172172 
173Authenticate with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) or an OAuth token with the `org:admin` scope. You can also use a personal or service account key scoped to the organization. A personal or service account key has the permissions of its user or service account. Keys scoped to a single workspace, including workspace keys, don’t work. See the Admin API page’s [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) section.
174 
173175On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, use the platform’s base URL and credentials instead. See the Admin API page’s [Cloud platforms](https://platform.claude.com/docs/en/manage-claude/admin-api#cloud-platforms) section.
174176 
175177The following examples read the Admin API key from the `ANTHROPIC_API_KEY` environment variable. The SDK exposes these endpoints under `client.organization.workspaces` (csharp, go: `client.Organization.Workspaces`; java: `client.organization().workspaces()`; php: `$client->organization->workspaces`).
from line 860
858860 
859861## API keys and resource scoping
860862 
861Apart from organization-level requests, such as Admin API requests, every request runs in exactly one workspace. It can only access resources within that workspace. Which workspace depends on the [key type](https://platform.claude.com/docs/en/manage-claude/authentication#key-types):
863Apart from organization-level requests, such as Admin API requests, every request runs in exactly one workspace. It can only access resources within that workspace. Which workspace a key’s requests run in depends on the key’s type and scope: see [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) on the Developer API keys page.
862864 
863* A **workspace key** (a legacy key without an owner) belongs to the workspace it was created in and always runs there.
864* A **personal key** or **service account key** acts as its user or service account. A single-workspace key always runs in the workspace chosen when it was created. A key that isn’t scoped to a workspace runs in the workspace named by each request’s `anthropic-workspace-id` header. Accounts must have access to the workspace to use it.
865 
866865On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, these key types don’t apply. The request names the workspace, as [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms) describes.
867866 
868867Resources scoped to workspaces include:
from line 880
881880 * The cap of 10 active tunnels applies organization-wide.
882881 * In the Claude Console, managing tunnels requires the admin organization role. Organization developers can view tunnels there but not change them.
883882 
884* **Workspaces** themselves and **organization members** are managed at the organization level through the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), using an Admin API key, an `org:admin` OAuth token, or a personal or service account key that isn’t scoped to a specific workspace.
883* **Workspaces** themselves and **organization members** are managed at the organization level through the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api). For the credentials it accepts, see [Using the Admin API](https://platform.claude.com/docs/en/manage-claude/workspaces#using-the-admin-api).
885884 
886To look up your organization’s workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them on the [Workspaces](https://platform.claude.com/settings/workspaces) page in the Claude Console.
885To find a workspace’s ID, use either of these:
887886 
887* The **ID** column on the [Workspaces](https://platform.claude.com/settings/workspaces) page in the Claude Console. The page lists the default workspace too.
888* [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) in the Admin API. It includes the default workspace only when you pass `include_default=true`.
889 
888890## Identify the workspace behind an API response
889891 
890Claude API responses include an `anthropic-workspace-id` header alongside the `request-id` and `anthropic-organization-id` [response headers](https://platform.claude.com/docs/en/api/overview#response-headers). Its value is the `wrkspc_`-prefixed ID of the workspace that the request’s API key or access token resolved to, including when that workspace is the Default Workspace. For example, a successful response includes headers like these:
892Claude API responses include an `anthropic-workspace-id` header alongside the `request-id` and `anthropic-organization-id` [response headers](https://platform.claude.com/docs/en/api/overview#response-headers). Its value is the `wrkspc_`-prefixed ID of the workspace that the request’s API key or access token resolved to, including when that workspace is the default workspace. For example, a successful response includes headers like these:
891893 
892894```http
893895HTTP/1.1 200 OK
from line 900
898900 
899901The header is absent when the credential doesn’t resolve to a workspace (for example, on Admin API requests) or when the request fails before authentication completes, such as a 401 error.
900902 
901The following examples send a Messages API request and read the workspace ID from the response headers. Set `ANTHROPIC_API_KEY` to a key scoped to a single workspace (see [API keys and resource scoping](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping)), not to an Admin API key:
903The following examples send a Messages API request and read the workspace ID from the response headers. Set `ANTHROPIC_API_KEY` to a key scoped to a single workspace (see [Developer API key scope](https://platform.claude.com/docs/en/manage-claude/api-keys#scope)), not to an Admin API key:
902904 
903905<CodeGroup>
904906 ```bash cURL
from line 1052
10501052With the workspace ID from a response, you can:
10511053 
10521054* Confirm which workspace’s usage, cost, and [rate limits](https://platform.claude.com/docs/en/api/rate-limits) the request counted toward
1053* Match it against the `workspace_id` field in [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) rows, which carry this same ID for the Default Workspace
1054* Match it against the `scope` field of API keys in the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), which carries the real ID of the workspace that a key is bound to, including the Default Workspace
1055* Check whether it’s your Default Workspace’s ID by passing it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys): the Default Workspace comes back with `"name": "Default"`, even though [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) omits it unless you pass `include_default=true`
1055* Match it against the `workspace_id` field in [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) rows, which carry this same ID for the default workspace
1056* Match it against the `scope` field of Developer API keys in the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), which carries the ID of the workspace that a key is scoped to, including the default workspace
1057* Pass it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) to check whether it’s your default workspace, which comes back with `"name": "Default"`
10561058* Find the request’s resources, such as sessions, files, message batches, and skills: look up the workspace’s name on the [Workspaces](https://platform.claude.com/settings/workspaces) page in the Claude Console, then select it in the workspace picker on a page such as [Files](https://platform.claude.com/files)
10571059 
10581060## Workspace limits
from line 1074
10721074 - Organization-wide limits always apply, even if workspace limits add up to more.
10731075</Note>
10741076 
1075A spend limit on the Default Workspace might not count or stop some usage in that workspace. This includes usage from the Claude Console (such as playground) and from Claude Managed Agents sessions. It also includes Claude Code or Claude Desktop usage when a member signs in with a Claude Console account and uses the Default Workspace. Your organization’s [spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit) applies to all of this usage.
1077A spend limit on the default workspace might not count or stop some usage in that workspace. This includes usage from the Claude Console (such as playground) and from Claude Managed Agents sessions. It also includes Claude Code or Claude Desktop usage when a member signs in with a Claude Console account and uses the default workspace. Your organization’s [spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit) applies to all of this usage.
10761078 
10771079For detailed information on rate limits and how they work, see [Rate limits](https://platform.claude.com/docs/en/api/rate-limits). You can also read your current organization and workspace rate limits and set workspace rate limits programmatically with the [Rate Limits API](https://platform.claude.com/docs/en/manage-claude/rate-limits-api), which stores a value above the organization’s limit but still enforces the lower of the two.
10781080 
from line 1236
12341236 ```
12351237</CodeGroup>
12361238 
1237Usage and costs in the Default Workspace are reported under the Default Workspace’s own ID.
1239Usage and costs in the default workspace are reported under the default workspace’s own ID.
12381240 
12391241## Common use cases
12401242 
from line 1291
12891291## FAQ
12901292 
12911293<AccordionGroup>
1292 <Accordion title="What’s the Default Workspace?">
1293 Every organization has a “Default Workspace” that cannot be renamed, archived, or deleted. Like every workspace, it has a `wrkspc_` ID. The API returns that ID in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and you can pass it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/update). Update Workspace rejects a new name for it. The Default Workspace has no member list of its own, because access to it follows each member’s organization role. It appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`. The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) reports its usage and cost under its real ID. The legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports show `null` for `workspace_id`. For an API key that belongs to it, the key’s `scope` field carries the workspace’s real ID.
1294 <Accordion title="What’s the default workspace?">
1295 Every organization has a default workspace that cannot be renamed, archived, or deleted. For how it differs from other workspaces, see [How workspaces work](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work).
12941296 </Accordion>
12951297 
12961298 <Accordion title="What’s the Claude Code workspace?">
from line 1300
12981300 </Accordion>
12991301 
13001302 <Accordion title="Are there limits on workspaces?">
1301 Yes. Each organization can have up to 1,000 workspaces by default, and archived workspaces and the Default Workspace don’t count toward this limit. If you need more, contact your account team.
1303 Yes. Each organization can have up to 1,000 workspaces by default, and archived workspaces and the default workspace don’t count toward this limit. If you need more, contact your account team.
13021304 </Accordion>
13031305 
13041306 <Accordion title="How do organization roles affect workspace access?">
from line 1320
13181320 </Accordion>
13191321 
13201322 <Accordion title="What happens to API keys when a user is removed from a workspace?">
1321 Behavior depends on the [key type](https://platform.claude.com/docs/en/manage-claude/authentication#key-types).
1323 Behavior depends on the [key type](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types).
13221324 
13231325 A personal or service account key stops working in a workspace shortly after its user or service account is removed from it. A service account key keeps working even if the user who created it is removed. Workspace keys (legacy keys without an owner) 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.
13241326 

managed-agents/multiagent-orchestration Changed · +5 / -0 lines

from line 864
864864* **Which agents it uses:** [Inline agents](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#predefined-and-inline-agents) that the workflow defines, predefined agents that you list in the `predefined_agents` (java, php: `predefinedAgents`; csharp, go: `PredefinedAgents`) list of `workflows` (csharp, go: `Workflows`), or both. If you list none, the workflow defines them all. An inline agent uses the model of the agent that the session runs. To let a run use another model for some of its agents, create them as agents and list them in the `predefined_agents` (java, php: `predefinedAgents`; csharp, go: `PredefinedAgents`) list of `workflows` (csharp, go: `Workflows`).
865865* **How you follow it:** Run events arrive on the session’s event stream, and each agent in the run works in a [session thread](https://platform.claude.com/docs/en/managed-agents/session-threads) that you can list, read, and stream. See [Workflow runs](https://platform.claude.com/docs/en/managed-agents/workflow-runs) for the events, interrupts, [limits](https://platform.claude.com/docs/en/managed-agents/workflow-runs#limits), and [what a run’s threads show](https://platform.claude.com/docs/en/managed-agents/workflow-runs#a-runs-threads).
866866 
867These complete examples use dynamic workflows:
868 
869* In the [Knowledge wiki with a dynamic workflow](https://github.com/anthropics/claude-quickstarts/tree/main/managed-agents/knowledge-wiki) quickstart on GitHub, a workflow run builds a wiki in a [memory store](https://platform.claude.com/docs/en/managed-agents/memory) from source documents.
870* In the [Dreaming with a dynamic workflow](https://platform.claude.com/cookbook/managed-agents-cma-dreaming-with-a-dynamic-workflow) recipe in the Claude Cookbook, a workflow run distills past session transcripts into a memory store.
871 
867872### Turn on dynamic workflows
868873 
869874When [defining your agent](https://platform.claude.com/docs/en/managed-agents/agent-setup), set `multiagent.type` to `"multiagent_20261001"` and enable `workflows` (csharp, go: `Workflows`). Dynamic workflows and delegating (`subagents` (csharp, go: `Subagents`)) are both on by default with this type. For dynamic workflows only, also set `subagents` (csharp, go: `Subagents`) to `{"type": "disabled"}`.

managed-agents/quickstart Changed · +15 / -5 lines

from line 69
6969 <Step title="Choose how to authenticate">
7070 Signing in with the CLI is recommended for local development.
7171 
72 For code that runs in CI or on a server with an identity provider, set up [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) instead. For other ways to authenticate, see [Authentication](https://platform.claude.com/docs/en/manage-claude/authentication).
73 
7274 Follow the steps for one of the following options.
7375 </Step>
7476</Steps>
from line 117
115117 ```
116118 </Tab>
117119 </Tabs>
120 
121 On Windows, you can install the CLI inside [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl/install) with the Linux steps. If you sign in with the CLI inside WSL, also run your code there so that it finds your sign-in.
118122 </Step>
119123 
120124 <Step title="Sign in" stepNumber={4}>
121 ```bash
125 ```bash CLI
122126 ant auth login
123127 ```
124128 
125 Once login is completed, the SDKs and CLI will pick up your credentials automatically.
129 Your browser opens. The first time you sign in, select an organization if you belong to more than one, and then a workspace.
130 
131 After you sign in, the SDK and the CLI use your credentials automatically unless `ANTHROPIC_API_KEY` is set (see [Which credential is used](https://platform.claude.com/docs/en/manage-claude/authentication#which-credential-is-used)).
126132 </Step>
127133</Steps>
128134 
from line 136
130136 
131137<Steps continued>
132138 <Step title="Create an API key" stepNumber={3}>
133 Create an [API key](https://platform.claude.com/settings/keys) in the Claude Console.
139 Create an API key by following the steps in [Get your Claude API key](https://platform.claude.com/docs/en/get-api-key#create-an-api-key).
134140 </Step>
135141 
136142 <Step title="Set the environment variable" stepNumber={4}>
137 The SDKs and CLI read your key from `ANTHROPIC_API_KEY`:
143 Set the key as an environment variable for your current shell session:
138144 
139145 ```bash
140 export ANTHROPIC_API_KEY="your-api-key-here"
146 export ANTHROPIC_API_KEY="sk-ant-..."
141147 ```
148 
149 The SDK and the CLI read `ANTHROPIC_API_KEY` automatically. To set it for every new shell or on Windows, see [API key](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication#api-key) on the CLI authentication options page.
142150 </Step>
143151</Steps>
144152 
from line 192
184192 ```
185193 </Tab>
186194</Tabs>
195 
196On Windows, you can install the CLI inside [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl/install) with the Linux steps. If you sign in with the CLI inside WSL, also run your code there so that it finds your sign-in.
187197 
188198## Install the SDK
189199 

models/fable-5-2/migration-guide Changed · +12 / -9 lines

from line 361
361361 
362362## Migrating to Claude Fable 5.2 from Claude Opus 4.8 or earlier
363363 
364First work through [Migrating to Claude Fable 5.2 from Claude Opus 5](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide#migrating-from-claude-opus-5-to-claude-fable-5-2), with `claude-opus-4-8` as the model ID you replace. That section applies to code on Claude Opus 4.8 as written, because Claude Opus 4.8, like Claude Opus 5:
364Read this section to the end. Then, work through [Migrating to Claude Fable 5.2 from Claude Opus 5](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide#migrating-from-claude-opus-5-to-claude-fable-5-2) with `claude-opus-4-8` as the model ID you replace. Where the two sections differ, follow this one.
365365 
366* Accepts `thinking: {type: "disabled"}`, forced tool choice, the `computer_20251124` tool, and fast mode, which is [deprecated on Claude Opus 4.8](https://platform.claude.com/docs/en/build-with-claude/fast-mode).
367* Returns the text between tool calls as `text` blocks.
368* Is available under legacy zero data retention (Legacy ZDR) arrangements.
369* Costs $5 USD per million input tokens and $25 USD per million output tokens, with prompt cache reads at $0.50 USD.
366The Claude Opus 5 section applies to code on Claude Opus 4.8 because the two models share these traits:
370367 
371This section adds the differences that the Claude Opus 5 section doesn’t cover.
368* **Request parameters:** Both accept `thinking: {type: "disabled"}`, forced tool choice, and the `computer_20251124` tool.
369* **Fast mode:** Both support fast mode, which is [deprecated on Claude Opus 4.8](https://platform.claude.com/docs/en/build-with-claude/fast-mode#feature-availability).
370* **Text between tool calls:** Both return the text between tool calls as `text` blocks.
371* **Data retention:** Both are available under legacy zero data retention (Legacy ZDR) arrangements.
372* **Pricing:** Both cost $5 USD per million input tokens and $25 USD per million output tokens. Prompt cache reads cost $0.50 USD per million tokens.
372373 
374The rest of this section covers what else changes when you move from Claude Opus 4.8. It also gives the extra steps for earlier models.
375 
373376### What changes
374377 
3753781. **Thinking runs on requests that omit it:** On Claude Opus 4.8, thinking is off unless you ask for it. On Claude Fable 5.2, a request with no `thinking` field runs with adaptive thinking. Responses can carry `thinking` blocks before `text` blocks, so select content blocks by `type` instead of reading `content[0].text`. In a tool-use loop, send the `thinking` blocks back unchanged with the tool results, including empty ones. Thinking tokens are billed as output tokens, and `max_tokens` covers thinking plus response text. Revisit `max_tokens`, and lower `effort` where you want less thinking. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Fable 5.2 reads the thinking blocks from earlier Claude Opus 4.8 turns, so a conversation that moves onto `claude-fable-5-2` keeps that reasoning.
from line 387
384387 
385388### Migration checklist
386389 
387* Work through the [Claude Opus 5 checklist](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide#migration-checklist-fable-5-2-from-opus-5), with `claude-opus-4-8` as the model ID you replace.
390* Work through the [Claude Opus 5 checklist](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide#migration-checklist-fable-5-2-from-opus-5) with `claude-opus-4-8` as the model ID you replace.
388391* Review workloads that ran without a `thinking` field. On Claude Fable 5.2 they run with thinking, so revisit `max_tokens`, lower `effort` where you want less thinking, and select content blocks by `type`.
389392* Check that any code that parses the `thinking` field treats it as display text only. Set `thinking.display` to `"summarized"` to receive readable summaries.
390393* Review prompts near the caching minimum: prompts of 512 tokens or more can create cache entries.

release-notes/overview Changed · +8 / -4 lines

### November 13, 2026

from line 62
6262* Text generated by Claude Opus 4.6, Claude Opus 4.5, Claude Sonnet 4.5, and Claude Haiku 4.5 carries Anthropic’s text watermark on supported platforms. [How Claude marks AI-generated content](https://support.claude.com/en/articles/16266773-how-claude-marks-ai-generated-content) lists those platforms. If a request to one of these models sets `temperature`, `top_p`, or `top_k` to a non-default value, the text might not carry the watermark. See [Text watermark](https://platform.claude.com/docs/en/build-with-claude/text-watermark).
6363* We’ve added two event types to [organization webhooks](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#encryption-key-events), which are in beta. We send `external_key.failed` when your key management service keeps refusing a customer-managed encryption key, and `external_key.recovered` when the key works again.
6464 
65### November 13, 2026
66 
67* The Compliance API [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) no longer records activities that belong to a member’s account for every member. It records them only when the member’s email address is on a domain that your parent organization has verified. These activities include sign-outs, account deletions, and sign-ins by email link or social login. Activities recorded before this change stay in the feed, and SSO sign-ins are recorded as before. To record these activities for members on other domains, verify those domains. See [Activities that belong to an account](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed#activities-that-belong-to-an-account) for the full list and for how verifying a domain can affect SSO.
68 
6569### November 12, 2026
6670 
6771* We’ve launched [self-hosted Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/self-hosted). You run the whole Managed Agents service, not only [self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes), on your own infrastructure, and you store agents, sessions, and session history there. The server sends model requests to the provider that you choose, which is Anthropic by default. To request access, contact your Anthropic account team.
from line 252
248252### August 27, 2026
249253 
250254* In Python SDK 1.2.0, TypeScript SDK 0.122.0, Go SDK 1.68.0, Java SDK 2.59.0, Ruby SDK 1.67.0, and C# SDK 12.44.0, `client.beta.files` and `client.beta.skills` no longer send the `files-api-2025-04-14` and `skills-2025-10-02` beta headers and return the same shapes as `client.files` and `client.skills`. With this change, `client.beta.skills.delete()` deletes a Skill together with all of its versions, and the beta Messages type `BetaSkill` (the container Skill reference) is renamed `BetaContainerSkill`. Requests that still send the beta headers keep receiving the beta shapes. See [Migrate from `files-api-2025-04-14`](https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14) and [Migrate from `skills-2025-10-02`](https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02).
251* You can now create **personal keys** and **service account keys** in the Claude Console. They act as you or as a [service account](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#service-accounts), with the same permissions, and stop working when the linked account is removed from an organization. This lets organization admins more easily track usage for each account, and ensure key usage is legitimate. These API keys can be scoped to a specific workspace or [work on admin endpoints and across any workspace](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) the account has access to. Workspace API keys remain supported as a legacy option. See [API keys in Authentication](https://platform.claude.com/docs/en/manage-claude/authentication#api-keys) for more information.
255* You can now create **personal keys** and **service account keys** in the Claude Console. They act as you or as a [service account](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#service-accounts), with that account’s permissions. They stop working when you leave the organization or the service account is archived. These keys let organization admins more easily track usage for each account and ensure key usage is legitimate. You can scope one of these keys to a single workspace or to the organization. A key scoped to the organization [works on admin endpoints and in any workspace](https://platform.claude.com/docs/en/manage-claude/api-keys#select-a-workspace) where its account is a member and can use the API. Workspace API keys remain supported as a legacy option. See [Key types](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) on the Developer API keys page.
252256 
253257### August 26, 2026
254258 
from line 284
280284### August 11, 2026
281285 
282286* The [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) now returns transcripts of Cowork and Claude Code sessions that run on your users’ machines, in beta for Claude Enterprise organizations. `GET /v1/compliance/apps/sessions/local` lists sessions across your organization, `GET /v1/compliance/apps/sessions/local/{session_id}` retrieves one session’s metadata, and `GET /v1/compliance/apps/sessions/local/{session_id}/messages` returns its transcript, all with your existing Compliance Access Key and the `read:compliance_user_data` scope. See [Sessions on users’ machines](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-local-sessions).
283* We’ve added the `anthropic-workspace-id` response header to the Claude API. It carries the `wrkspc_`-prefixed ID of the workspace that the request’s API key or access token resolved to, including your organization’s Default Workspace. See [Identify the workspace behind an API response](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response).
287* We’ve added the `anthropic-workspace-id` response header to the Claude API. It carries the `wrkspc_`-prefixed ID of the workspace that the request’s API key or access token resolved to, including your organization’s default workspace. See [Identify the workspace behind an API response](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response).
284288 
285289### August 10, 2026
286290 
from line 347
343347 
344348### July 8, 2026
345349 
346* You can now set an expiration when you create an API key or an Admin API key in the [Claude Console](https://platform.claude.com/settings/keys). Choose a preset, a custom duration, or **Never**. For keys with a lifetime of at least 7 days, Anthropic emails the creator before expiration. Existing keys are unaffected. The Admin API reports each key’s expiration in the [`expires_at`](https://platform.claude.com/docs/en/api/beta/organization/api_keys/list) field. See [Key expiration in Authentication](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration).
350* You can now set an expiration when you create an API key or an Admin API key. You create them on the Claude Console’s [API keys](https://platform.claude.com/settings/keys) and [Admin keys](https://platform.claude.com/settings/admin-keys) pages. Choose a preset, a custom duration, or **Never**. For keys with a lifetime of at least 7 days, Anthropic emails the creator before expiration. Existing keys are unaffected. The Admin API reports each key’s expiration in the `expires_at` field of [List API Keys](https://platform.claude.com/docs/en/api/beta/organization/api_keys/list). See [Key expiration](https://platform.claude.com/docs/en/manage-claude/api-keys#key-expiration) in the Developer API keys guide.
347351 
348352### July 2, 2026
349353 
from line 859
855859### December 4, 2024
856860 
857861* We’ve added the ability to group by API key on the [Usage](https://console.anthropic.com/settings/usage) and [Cost](https://console.anthropic.com/settings/cost) pages of the [Developer Console](https://console.anthropic.com).
858* We’ve added two new **Last used at** and **Cost** columns and the ability to sort by any column on the [API keys](https://console.anthropic.com/settings/keys) page of the [Developer Console](https://console.anthropic.com).
862* We’ve added two new **Last used at** and **Cost** columns and the ability to sort by any column on the [API keys](https://platform.claude.com/settings/keys) page of the [Developer Console](https://platform.claude.com/).
859863 
860864### November 21, 2024
861865 

about-claude/models/optimizing-for-cost-and-intelligence Changed · +1 / -1 lines

from line 57
5757* Caching does not stop the resending, but each resend costs about a tenth as much (a twentieth on Claude Opus 5.5 and Claude Sonnet 5.5, a fortieth on Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, and Claude Mythos 5.1) and processes faster.
5858* The prefix is billed at the [cache-read rate](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing) instead of the input price, and each turn pays the 1.25x cache-write rate only for what is new.
5959 
60[Message threads](https://platform.claude.com/docs/en/build-with-claude/message-threads), in beta, stop the resending while a thread lasts, until 5 minutes after its last request. They lower time to first token, not cost: the model still reads the whole conversation, so keep `cache_control` on every request. Threads don’t support compaction or most context editing.
60[Message threads](https://platform.claude.com/docs/en/build-with-claude/message-threads), in beta, stop the resending while a thread lasts, until 5 minutes after its last request. They lower time to first token, not cost: the model still reads the whole conversation, so keep `cache_control` on every request. Threads don’t support compaction on demand or most context editing. On the Claude API, Claude Platform on AWS, and Claude in Microsoft Foundry, they accept one form of threshold compaction (see [Features that threads don’t support](https://platform.claude.com/docs/en/build-with-claude/message-threads#unsupported)).
6161 
6262**What good looks like.**
6363 
Feedback