One read of Claude Developer Platformapi-20260814T043121Z
565 pages moved out of 565 read.
What this read moved
151-175 of 565, page 7 of 23This capture is too large to show at once. Changes 151-175 of 565 are below, significant first; the rest are on the following screens.
api/admin/service_accounts/workspaces/list First recorded · 112 lines, first recorded
## List Workspaces For Service Account ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: List Workspaces For Service Account
url: https://platform.claude.com/docs/en/api/admin/service_accounts/workspaces/list
---
## List Workspaces For Service Account
**get** `/v1/organizations/service_accounts/{service_account_id}/workspaces`
List the workspaces a service account is a member of.
Each entry includes the service account's `workspace_role` in that
workspace. Use `limit` and the `next_page` cursor to paginate. When the
service account has no explicit default-workspace membership, the
implicit (`implicit: true`) membership is returned as the first entry on
the first page; with `limit=1` the first page may return up to 2 entries
(the implicit entry plus one explicit membership) so a pagination cursor
can be derived. Memberships are returned only while
the service account is active; an archived service account returns an
empty list.
### Path Parameters
- `service_account_id: string`
ID of the service account.
### Query Parameters
- `limit: optional number`
Number of results per page.
- `page: optional string`
Opaque cursor from a previous response's `next_page`.
### Header Parameters
- `"anthropic-beta": optional array of string`
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
### Returns
- `data: array of object { created_by_actor_id, implicit, service_account_id, 3 more }`
- `created_by_actor_id: string or null`
Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.
- `implicit: boolean or null`
True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.
- `service_account_id: string`
Tagged service account ID (`svac_...`).
- `type: "service_account_workspace_member"`
- `"service_account_workspace_member"`
- `workspace_id: string`
Tagged workspace ID (`wrkspc_...`).
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
- `next_page: string or null`
Opaque cursor for the next page, or null if no more results.
### Example
```http
curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/workspaces \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"created_by_actor_id": "created_by_actor_id",
"implicit": true,
"service_account_id": "service_account_id",
"type": "service_account_workspace_member",
"workspace_id": "workspace_id",
"workspace_role": "workspace_admin"
}
],
"next_page": "next_page"
}
```
api/admin/spend_limits First recorded · 2158 lines, first recorded
# Spend Limits ## Set Spend Limit ### Body Parameters ### Returns ### Example #### Response ## Get Spend Limit ### Path Parameters ### Returns ### Example #### Response ## Delete Spend Limit ### Path Parameters ### Returns ### Example #### Response ## List Effective Spend Limits ### Query Parameters ### Returns ### Example #### Response ## Domain Types ### Spend Limit ### Spend Summary ### Spend Limit Delete Response # Increase Requests ## List Spend Limit Increase Requests ### Query Parameters ### Returns ### Example #### Response ## Get Spend Limit Increase Request ### Path Parameters ### Returns ### Example #### Response ## Approve Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Deny Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Domain Types ### Spend Limit Increase Request ### Increase Request Approve Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Spend Limits
url: https://platform.claude.com/docs/en/api/admin/spend_limits
---
# Spend Limits
## Set Spend Limit
**post** `/v1/organizations/spend_limits`
Set a per-user spend limit override.
Upsert keyed on (scope, period): setting a limit that already exists
overwrites it in place. Only `scope.type: "user"` is accepted; seat-tier,
group, and organization-level defaults are configured in claude.ai.
### Body Parameters
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of the organization's billing currency (cents for USD): "50000" is $500.00. `null` sets an explicit no-limit override for this scope and `period` only — each period resolves independently, so caps for other periods still apply.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `period: optional "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
### Returns
- `SpendLimit object { id, amount, created_at, 5 more }`
- `id: string`
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.
- `created_at: string`
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `type: "spend_limit"`
- `"spend_limit"`
- `updated_at: string`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"amount": "50000",
"scope": {
"type": "user",
"user_id": "user_id"
},
"period": "monthly"
}'
```
#### Response
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_id"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
## Get Spend Limit
**get** `/v1/organizations/spend_limits/{spend_limit_id}`
Retrieve a spend limit by ID.
### Path Parameters
- `spend_limit_id: string`
ID of the Spend Limit.
### Returns
- `SpendLimit object { id, amount, created_at, 5 more }`
- `id: string`
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.
- `created_at: string`
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `type: "spend_limit"`
- `"spend_limit"`
- `updated_at: string`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_id"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
## Delete Spend Limit
**delete** `/v1/organizations/spend_limits/{spend_limit_id}`
Delete a per-user spend limit override.
The member falls back to any inherited spend limit at that period.
Seat-tier, group, and organization-level rows cannot be deleted via
this endpoint.
### Path Parameters
- `spend_limit_id: string`
ID of the Spend Limit.
### Returns
- `id: string`
- `type: "spend_limit_deleted"`
- `"spend_limit_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "id",
"type": "spend_limit_deleted"
}
```
## List Effective Spend Limits
**get** `/v1/organizations/spend_limits/effective`
List each member's effective spend limit and period-to-date spend.
Cut at 300 lines. The page has the rest.
api/admin/spend_limits/create First recorded · 141 lines, first recorded
## Set Spend Limit ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Set Spend Limit
url: https://platform.claude.com/docs/en/api/admin/spend_limits/create
---
## Set Spend Limit
**post** `/v1/organizations/spend_limits`
Set a per-user spend limit override.
Upsert keyed on (scope, period): setting a limit that already exists
overwrites it in place. Only `scope.type: "user"` is accepted; seat-tier,
group, and organization-level defaults are configured in claude.ai.
### Body Parameters
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of the organization's billing currency (cents for USD): "50000" is $500.00. `null` sets an explicit no-limit override for this scope and `period` only — each period resolves independently, so caps for other periods still apply.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `period: optional "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
### Returns
- `SpendLimit object { id, amount, created_at, 5 more }`
- `id: string`
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.
- `created_at: string`
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `type: "spend_limit"`
- `"spend_limit"`
- `updated_at: string`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"amount": "50000",
"scope": {
"type": "user",
"user_id": "user_id"
},
"period": "monthly"
}'
```
#### Response
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_id"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
api/admin/spend_limits/delete First recorded · 46 lines, first recorded
## Delete Spend Limit ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Delete Spend Limit
url: https://platform.claude.com/docs/en/api/admin/spend_limits/delete
---
## Delete Spend Limit
**delete** `/v1/organizations/spend_limits/{spend_limit_id}`
Delete a per-user spend limit override.
The member falls back to any inherited spend limit at that period.
Seat-tier, group, and organization-level rows cannot be deleted via
this endpoint.
### Path Parameters
- `spend_limit_id: string`
ID of the Spend Limit.
### Returns
- `id: string`
- `type: "spend_limit_deleted"`
- `"spend_limit_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "id",
"type": "spend_limit_deleted"
}
```
api/admin/spend_limits/increase_requests First recorded · 1539 lines, first recorded
# Increase Requests ## List Spend Limit Increase Requests ### Query Parameters ### Returns ### Example #### Response ## Get Spend Limit Increase Request ### Path Parameters ### Returns ### Example #### Response ## Approve Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Deny Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Domain Types ### Spend Limit Increase Request ### Increase Request Approve Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Increase Requests
url: https://platform.claude.com/docs/en/api/admin/spend_limits/increase_requests
---
# Increase Requests
## List Spend Limit Increase Requests
**get** `/v1/organizations/spend_limit_increase_requests`
List spend limit increase requests, most recent first.
Pending requests include a live `spend_summary` for the requester.
Requests whose requester is no longer a member are excluded.
### Query Parameters
- `actor_ids: optional array of string`
Filter by requester, as `user_...` tagged IDs.
- `limit: optional number`
- `page: optional string`
Opaque cursor from a previous response's `next_page`.
- `status: optional array of "approved" or "denied" or "pending"`
Filter by status. Omit to return all.
- `"approved"`
- `"denied"`
- `"pending"`
### Returns
- `data: array of SpendLimitIncreaseRequest`
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `created_at: string`
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } or null`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `UserActor object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `ScopedAPIKeyActor object { scoped_api_key_id, type }`
A scoped Admin API key acting on behalf of the organization.
- `scoped_api_key_id: string`
- `type: "scoped_api_key_actor"`
- `"scoped_api_key_actor"`
- `spend_summary: SpendSummary or null`
Per-member effective-limit report row (GET /spend_limits/effective).
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `type: "spend_limit_increase_request"`
- `"spend_limit_increase_request"`
- `next_page: string or null`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "monthly",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_id"
},
"source": {
"type": "user",
"user_id": "user_id"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}
],
"next_page": "next_page"
}
```
## Get Spend Limit Increase Request
**get** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}`
Retrieve a spend limit increase request.
While `pending`, the response includes a live `spend_summary` for the
requester at the request's period.
### Path Parameters
- `spend_limit_increase_request_id: string`
ID of the spend limit increase request.
### Returns
- `SpendLimitIncreaseRequest object { id, actor, created_at, 6 more }`
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
Cut at 300 lines. The page has the rest.
api/admin/spend_limits/increase_requests/approve First recorded · 352 lines, first recorded
## Approve Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Approve Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/admin/spend_limits/increase_requests/approve
---
## Approve Spend Limit Increase Request
**post** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve`
Approve a pending spend limit increase request.
Writes a per-user spend limit at `amount` for the requester and
transitions the request to `approved`. `period` defaults to the period
the member was blocked on. Anthropic emails the requester unless
`suppress_notification` is set.
### Path Parameters
- `spend_limit_increase_request_id: string`
ID of the spend limit increase request.
### Body Parameters
- `amount: string`
New per-user spend limit as a non-negative integer decimal string (minor units).
- `period: optional "daily" or "monthly" or "weekly" or null`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `suppress_notification: optional boolean`
### Returns
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `created_at: string`
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } or null`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `UserActor object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `ScopedAPIKeyActor object { scoped_api_key_id, type }`
A scoped Admin API key acting on behalf of the organization.
- `scoped_api_key_id: string`
- `type: "scoped_api_key_actor"`
- `"scoped_api_key_actor"`
- `spend_limit: SpendLimit`
- `id: string`
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.
- `created_at: string`
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `type: "spend_limit"`
- `"spend_limit"`
- `updated_at: string`
- `spend_summary: SpendSummary or null`
Per-member effective-limit report row (GET /spend_limits/effective).
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `type: "spend_limit_increase_request"`
- `"spend_limit_increase_request"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/$SPEND_LIMIT_INCREASE_REQUEST_ID/approve \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"amount": "50000",
"period": "monthly"
}'
```
#### Response
```json
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
Cut at 300 lines. The page has the rest.
api/admin/spend_limits/increase_requests/deny First recorded · 256 lines, first recorded
## Deny Spend Limit Increase Request ### Path Parameters ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Deny Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/admin/spend_limits/increase_requests/deny
---
## Deny Spend Limit Increase Request
**post** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny`
Deny a pending spend limit increase request.
Idempotent on `denied`; denying an already-`approved` request returns
400. Anthropic emails the requester unless `suppress_notification` is set.
### Path Parameters
- `spend_limit_increase_request_id: string`
ID of the spend limit increase request.
### Body Parameters
- `suppress_notification: optional boolean`
### Returns
- `SpendLimitIncreaseRequest object { id, actor, created_at, 6 more }`
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `created_at: string`
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } or null`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `UserActor object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `ScopedAPIKeyActor object { scoped_api_key_id, type }`
A scoped Admin API key acting on behalf of the organization.
- `scoped_api_key_id: string`
- `type: "scoped_api_key_actor"`
- `"scoped_api_key_actor"`
- `spend_summary: SpendSummary or null`
Per-member effective-limit report row (GET /spend_limits/effective).
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `type: "spend_limit_increase_request"`
- `"spend_limit_increase_request"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/$SPEND_LIMIT_INCREASE_REQUEST_ID/deny \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{}'
```
#### Response
```json
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "monthly",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_id"
},
"source": {
"type": "user",
"user_id": "user_id"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}
```
api/admin/spend_limits/increase_requests/list First recorded · 273 lines, first recorded
## List Spend Limit Increase Requests ### Query Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: List Spend Limit Increase Requests
url: https://platform.claude.com/docs/en/api/admin/spend_limits/increase_requests/list
---
## List Spend Limit Increase Requests
**get** `/v1/organizations/spend_limit_increase_requests`
List spend limit increase requests, most recent first.
Pending requests include a live `spend_summary` for the requester.
Requests whose requester is no longer a member are excluded.
### Query Parameters
- `actor_ids: optional array of string`
Filter by requester, as `user_...` tagged IDs.
- `limit: optional number`
- `page: optional string`
Opaque cursor from a previous response's `next_page`.
- `status: optional array of "approved" or "denied" or "pending"`
Filter by status. Omit to return all.
- `"approved"`
- `"denied"`
- `"pending"`
### Returns
- `data: array of SpendLimitIncreaseRequest`
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `created_at: string`
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } or null`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `UserActor object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `ScopedAPIKeyActor object { scoped_api_key_id, type }`
A scoped Admin API key acting on behalf of the organization.
- `scoped_api_key_id: string`
- `type: "scoped_api_key_actor"`
- `"scoped_api_key_actor"`
- `spend_summary: SpendSummary or null`
Per-member effective-limit report row (GET /spend_limits/effective).
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `type: "spend_limit_increase_request"`
- `"spend_limit_increase_request"`
- `next_page: string or null`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "monthly",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_id"
},
"source": {
"type": "user",
"user_id": "user_id"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}
],
"next_page": "next_page"
}
```
api/admin/spend_limits/increase_requests/retrieve First recorded · 250 lines, first recorded
## Get Spend Limit Increase Request ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Get Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/admin/spend_limits/increase_requests/retrieve
---
## Get Spend Limit Increase Request
**get** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}`
Retrieve a spend limit increase request.
While `pending`, the response includes a live `spend_summary` for the
requester at the request's period.
### Path Parameters
- `spend_limit_increase_request_id: string`
ID of the spend limit increase request.
### Returns
- `SpendLimitIncreaseRequest object { id, actor, created_at, 6 more }`
- `id: string`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `created_at: string`
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } or null`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `UserActor object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `ScopedAPIKeyActor object { scoped_api_key_id, type }`
A scoped Admin API key acting on behalf of the organization.
- `scoped_api_key_id: string`
- `type: "scoped_api_key_actor"`
- `"scoped_api_key_actor"`
- `spend_summary: SpendSummary or null`
Per-member effective-limit report row (GET /spend_limits/effective).
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `type: "spend_limit_increase_request"`
- `"spend_limit_increase_request"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/$SPEND_LIMIT_INCREASE_REQUEST_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "monthly",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_id"
},
"source": {
"type": "user",
"user_id": "user_id"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}
```
api/admin/spend_limits/list_effective First recorded · 158 lines, first recorded
## List Effective Spend Limits ### Query Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: List Effective Spend Limits
url: https://platform.claude.com/docs/en/api/admin/spend_limits/list_effective
---
## List Effective Spend Limits
**get** `/v1/organizations/spend_limits/effective`
List each member's effective spend limit and period-to-date spend.
Returns one row per (member, period) the member resolves a spend limit
for, with the `source` scope the spend limit was inherited from.
Paginates by member, so a member's periods never split across pages.
### Query Parameters
- `limit: optional number`
- `page: optional string`
- `period: optional array of string`
- `user_ids: optional array of string`
### Returns
- `data: array of SpendSummary`
- `actor: object { deleted, email_address, name, 2 more }`
A user within the organization. `name` and `email_address` are
null when the underlying account is unavailable or has been deleted;
`deleted` is true only for deleted accounts.
- `deleted: boolean`
- `email_address: string or null`
- `name: string or null`
- `type: "user_actor"`
- `"user_actor"`
- `user_id: string`
- `amount: string or null`
Effective limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD). `null` means no limit applies for this row's `period` — each period resolves independently, so another period may still cap this member.
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount` and `period_to_date_spend`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `period_to_date_spend: string`
The member's spend so far in the current period, as a non-negative decimal string in the minor unit of `currency` (cents for USD). May carry fractional minor units up to three decimal places (e.g. `"12050.5"`) — metered usage is not rounded to whole cents. Reads as `"0"` when the spend reading is temporarily unavailable.
- `scope: object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `source: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `spend_limit_id: string`
- `next_page: string or null`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits/effective \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_id"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_id"
},
"source": {
"type": "user",
"user_id": "user_id"
},
"spend_limit_id": "spend_limit_id"
}
],
"next_page": "next_page"
}
```
api/admin/spend_limits/retrieve First recorded · 112 lines, first recorded
## Get Spend Limit ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Get Spend Limit
url: https://platform.claude.com/docs/en/api/admin/spend_limits/retrieve
---
## Get Spend Limit
**get** `/v1/organizations/spend_limits/{spend_limit_id}`
Retrieve a spend limit by ID.
### Path Parameters
- `spend_limit_id: string`
ID of the Spend Limit.
### Returns
- `SpendLimit object { id, amount, created_at, 5 more }`
- `id: string`
- `amount: string or null`
Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.
- `created_at: string`
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object { type, user_id } or object { seat_tier, type } or object { rbac_group_id, type } or 2 more`
- `User object { type, user_id }`
- `type: "user"`
- `"user"`
- `user_id: string`
- `SeatTier object { seat_tier, type }`
- `seat_tier: string`
- `type: "seat_tier"`
- `"seat_tier"`
- `RbacGroup object { rbac_group_id, type }`
- `rbac_group_id: string`
- `type: "rbac_group"`
- `"rbac_group"`
- `OrganizationService object { service, type }`
- `service: string`
- `type: "organization_service"`
- `"organization_service"`
- `Organization object { type }`
- `type: "organization"`
- `"organization"`
- `type: "spend_limit"`
- `"spend_limit"`
- `updated_at: string`
### Example
```http
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_id"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
api/admin/usage_report First recorded · 839 lines, first recorded
# Usage Report ## Get Messages Usage Report ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Get Claude Code Usage Report ### Query Parameters ### Returns ### Example #### Response ## Domain Types ### Claude Code Usage Report ### Messages Usage Report
The first capture of this source. The page was already there, and this is what it said.
---
title: Usage Report
url: https://platform.claude.com/docs/en/api/admin/usage_report
---
# Usage Report
## Get Messages Usage Report
**get** `/v1/organizations/usage_report/messages`
Get Messages Usage Report
### Query Parameters
- `starting_at: string`
Time buckets that start on or after this RFC 3339 timestamp will be returned.
Each time bucket will be snapped to the start of the minute/hour/day in UTC.
- `account_ids: optional array of string`
Restrict usage returned to the specified user account ID(s).
- `api_key_ids: optional array of string`
Restrict usage returned to the specified API key ID(s).
- `bucket_width: optional "1d" or "1h" or "1m"`
Time granularity of the response data.
- `"1d"`
- `"1h"`
- `"1m"`
- `context_window: optional array of "0-200k" or "200k-1M"`
Restrict usage returned to the specified context window(s).
- `"0-200k"`
- `"200k-1M"`
- `ending_at: optional string`
Time buckets that end before this RFC 3339 timestamp will be returned.
- `group_by: optional array of "account_id" or "api_key_id" or "context_window" or 6 more`
Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header.
- `"account_id"`
- `"api_key_id"`
- `"context_window"`
- `"inference_geo"`
- `"model"`
- `"service_account_id"`
- `"service_tier"`
- `"speed"`
- `"workspace_id"`
- `inference_geos: optional array of "global" or "not_available" or "us"`
Restrict usage returned to the specified inference geo(s). Use `not_available` for models that do not support specifying `inference_geo`.
- `"global"`
- `"not_available"`
- `"us"`
- `limit: optional number`
Maximum number of time buckets to return in the response.
The default and max limits depend on `bucket_width`:
• `"1d"`: Default of 7 days, maximum of 31 days
• `"1h"`: Default of 24 hours, maximum of 168 hours
• `"1m"`: Default of 60 minutes, maximum of 1440 minutes
- `models: optional array of string`
Restrict usage returned to the specified model(s).
- `page: optional string`
Optionally set to the `next_page` token from the previous response.
- `service_account_ids: optional array of string`
Restrict usage returned to the specified service account ID(s).
- `service_tiers: optional array of "batch" or "flex" or "flex_discount" or 3 more`
Restrict usage returned to the specified service tier(s).
- `"batch"`
- `"flex"`
- `"flex_discount"`
- `"priority"`
- `"priority_on_demand"`
- `"standard"`
- `speeds: optional array of "fast" or "standard"`
Restrict usage returned to the specified speed(s) (Claude Code research preview).
Requires the `fast-mode-2026-02-01` beta header.
- `"fast"`
- `"standard"`
- `workspace_ids: optional array of string`
Restrict usage returned to the specified workspace ID(s).
### Header Parameters
- `"anthropic-beta": optional array of string`
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
### Returns
- `MessagesUsageReport object { data, has_more, next_page }`
- `data: array of object { ending_at, results, starting_at }`
List of time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no usage (their `results` list is empty). A page holds at most `limit` buckets.
- `ending_at: string`
End of the time bucket (exclusive) in RFC 3339 format.
- `results: array of object { account_id, api_key_id, cache_creation, 10 more }`
List of usage items for this time bucket. There may be multiple items if one or more `group_by[]` parameters are specified.
- `account_id: string or null`
ID of the user account that made the request. `null` if not grouping by account or for non-OAuth requests.
- `api_key_id: string or null`
ID of the API key used. `null` if not grouping by API key or for usage in the Anthropic Console.
- `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
The number of input tokens for cache creation.
- `ephemeral_1h_input_tokens: number`
The number of input tokens used to create the 1 hour cache entry.
- `ephemeral_5m_input_tokens: number`
The number of input tokens used to create the 5 minute cache entry.
- `cache_read_input_tokens: number`
The number of input tokens read from the cache.
- `context_window: "0-200k" or "200k-1M" or null`
Context window used. `null` if not grouping by context window.
- `"0-200k"`
- `"200k-1M"`
- `inference_geo: "global" or "not_available" or "us" or null`
Inference geo used matching requests' `inference_geo` parameter if set, otherwise the workspace's `default_inference_geo`.
For models that do not support specifying `inference_geo` the value is `"not_available"`. Always `null` if not grouping by inference geo.
- `"global"`
- `"not_available"`
- `"us"`
- `model: string or null`
Model used. `null` if not grouping by model.
- `output_tokens: number`
The number of output tokens generated.
- `server_tool_use: object { web_search_requests }`
Server-side tool usage metrics.
- `web_search_requests: number`
The number of web search requests made.
- `service_account_id: string or null`
ID of the service account that made the request. `null` if not grouping by service account or for non-OIDC-federation requests.
- `service_tier: "batch" or "flex" or "flex_discount" or 3 more or null`
Service tier used. `null` if not grouping by service tier.
- `"batch"`
- `"flex"`
- `"flex_discount"`
- `"priority"`
- `"priority_on_demand"`
- `"standard"`
- `uncached_input_tokens: number`
The number of uncached input tokens processed.
- `workspace_id: string or null`
ID of the Workspace used. `null` if not grouping by workspace or for the default workspace.
- `starting_at: string`
Start of the time bucket (inclusive) in RFC 3339 format.
- `has_more: boolean`
Indicates if there are more results.
- `next_page: string or null`
Opaque cursor for the next page, or `null` when `has_more` is false. Pass it as the `page` parameter in the next request.
### Example
```http
curl https://api.anthropic.com/v1/organizations/usage_report/messages \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"ending_at": "2025-08-02T00:00:00Z",
"results": [
{
"account_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"cache_creation": {
"ephemeral_1h_input_tokens": 1000,
"ephemeral_5m_input_tokens": 500
},
"cache_read_input_tokens": 200,
"context_window": "0-200k",
"inference_geo": "global",
"model": "claude-opus-4-6",
"output_tokens": 500,
"server_tool_use": {
"web_search_requests": 10
},
"service_account_id": "svac_01Hk3R9TWxq7CfQak00OiVw4",
"service_tier": "standard",
"uncached_input_tokens": 1500,
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}
],
"starting_at": "2025-08-01T00:00:00Z"
}
],
"has_more": true,
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}
```
Cut at 300 lines. The page has the rest.
api/admin/usage_report/retrieve_claude_code First recorded · 269 lines, first recorded
## Get Claude Code Usage Report ### Query Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Get Claude Code Usage Report
url: https://platform.claude.com/docs/en/api/admin/usage_report/retrieve_claude_code
---
## Get Claude Code Usage Report
**get** `/v1/organizations/usage_report/claude_code`
Retrieve daily aggregated usage metrics for Claude Code users.
Enables organizations to analyze developer productivity and build custom dashboards.
### Query Parameters
- `starting_at: string`
UTC date in YYYY-MM-DD format. Returns metrics for this single day only.
- `limit: optional number`
Number of records per page (default: 20, max: 1000).
- `page: optional string`
Opaque cursor token from previous response's `next_page` field.
### Returns
- `ClaudeCodeUsageReport object { data, has_more, next_page }`
- `data: array of object { actor, core_metrics, customer_type, 7 more }`
List of Claude Code usage records for the requested date.
- `actor: object { email_address, type } or object { api_key_name, type }`
The user or API key that performed the Claude Code actions.
- `UserActor object { email_address, type }`
- `email_address: string`
Email address of the user who performed Claude Code actions.
- `type: "user_actor"`
Actor type. Always `"user_actor"` for a user.
- `"user_actor"`
- `APIActor object { api_key_name, type }`
- `api_key_name: string`
Name of the API key used to perform Claude Code actions.
- `type: "api_actor"`
Actor type. Always `"api_actor"` for an API key.
- `"api_actor"`
- `core_metrics: object { commits_by_claude_code, lines_of_code, num_sessions, pull_requests_by_claude_code }`
Core productivity metrics measuring Claude Code usage and impact.
- `commits_by_claude_code: number`
Number of git commits created through Claude Code's commit functionality.
- `lines_of_code: object { added, removed }`
Statistics on code changes made through Claude Code.
- `added: number`
Total number of lines of code added across all files by Claude Code.
- `removed: number`
Total number of lines of code removed across all files by Claude Code.
- `num_sessions: number`
Number of distinct Claude Code sessions initiated by this actor.
- `pull_requests_by_claude_code: number`
Number of pull requests created through Claude Code's PR functionality.
- `customer_type: "api" or "subscription"`
Type of customer account (api for API customers, subscription for Pro/Team customers).
- `"api"`
- `"subscription"`
- `date: string`
UTC day the usage metrics cover, as an RFC 3339 timestamp at midnight UTC
(for example `2025-08-08T00:00:00Z`).
- `is_remote: boolean`
Whether the usage came from remote Claude Code sessions, such as Claude Code
on the web. Remote and local usage are reported as separate rows.
- `model_breakdown: array of object { estimated_cost, model, tokens }`
Token usage and cost breakdown by AI model used.
- `estimated_cost: object { amount, currency }`
Estimated cost for using this model
- `amount: number`
Estimated cost amount in minor currency units (e.g., cents for USD).
- `currency: string`
Currency code for the estimated cost (e.g., 'USD').
- `model: string`
Name of the AI model used for Claude Code interactions.
- `tokens: object { cache_creation, cache_read, input, output }`
Token usage breakdown for this model
- `cache_creation: number`
Number of cache creation tokens consumed by this model.
- `cache_read: number`
Number of cache read tokens consumed by this model.
- `input: number`
Number of input tokens consumed by this model.
- `output: number`
Number of output tokens generated by this model.
- `organization_id: string`
ID of the organization that owns the Claude Code usage.
- `terminal_type: string`
Type of terminal or environment where Claude Code was used.
- `tool_actions: map[object { accepted, rejected } ]`
Breakdown of tool action acceptance and rejection rates by tool type.
- `accepted: number`
Number of tool action proposals that the user accepted.
- `rejected: number`
Number of tool action proposals that the user rejected.
- `subscription_type: optional "enterprise" or "team" or null`
Subscription tier for subscription customers. `null` for API customers.
- `"enterprise"`
- `"team"`
- `has_more: boolean`
True if there are more records available beyond the current page.
- `next_page: string or null`
Opaque cursor token for fetching the next page of results, or null if no more pages are available.
### Example
```http
curl https://api.anthropic.com/v1/organizations/usage_report/claude_code \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"actor": {
"email_address": "[email protected]",
"type": "user_actor"
},
"core_metrics": {
"commits_by_claude_code": 8,
"lines_of_code": {
"added": 342,
"removed": 128
},
"num_sessions": 15,
"pull_requests_by_claude_code": 2
},
"customer_type": "api",
"date": "2025-08-08T00:00:00Z",
"is_remote": false,
"model_breakdown": [
{
"estimated_cost": {
"amount": 186,
"currency": "USD"
},
"model": "claude-opus-4-8",
"tokens": {
"cache_creation": 2340,
"cache_read": 8790,
"input": 45230,
"output": 12450
}
},
{
"estimated_cost": {
"amount": 42,
"currency": "USD"
},
"model": "claude-sonnet-5",
"tokens": {
"cache_creation": 890,
"cache_read": 3420,
"input": 23100,
"output": 5680
}
}
],
"organization_id": "12345678-1234-5678-1234-567812345678",
"terminal_type": "iTerm.app",
"tool_actions": {
"edit_tool": {
"accepted": 25,
"rejected": 3
},
"multi_edit_tool": {
"accepted": 12,
"rejected": 1
},
"notebook_edit_tool": {
"accepted": 5,
"rejected": 2
},
"write_tool": {
"accepted": 8,
"rejected": 0
}
},
"subscription_type": "enterprise"
}
],
"has_more": true,
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}
```
api/admin/usage_report/retrieve_messages First recorded · 297 lines, first recorded
## Get Messages Usage Report ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Get Messages Usage Report
url: https://platform.claude.com/docs/en/api/admin/usage_report/retrieve_messages
---
## Get Messages Usage Report
**get** `/v1/organizations/usage_report/messages`
Get Messages Usage Report
### Query Parameters
- `starting_at: string`
Time buckets that start on or after this RFC 3339 timestamp will be returned.
Each time bucket will be snapped to the start of the minute/hour/day in UTC.
- `account_ids: optional array of string`
Restrict usage returned to the specified user account ID(s).
- `api_key_ids: optional array of string`
Restrict usage returned to the specified API key ID(s).
- `bucket_width: optional "1d" or "1h" or "1m"`
Time granularity of the response data.
- `"1d"`
- `"1h"`
- `"1m"`
- `context_window: optional array of "0-200k" or "200k-1M"`
Restrict usage returned to the specified context window(s).
- `"0-200k"`
- `"200k-1M"`
- `ending_at: optional string`
Time buckets that end before this RFC 3339 timestamp will be returned.
- `group_by: optional array of "account_id" or "api_key_id" or "context_window" or 6 more`
Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header.
- `"account_id"`
- `"api_key_id"`
- `"context_window"`
- `"inference_geo"`
- `"model"`
- `"service_account_id"`
- `"service_tier"`
- `"speed"`
- `"workspace_id"`
- `inference_geos: optional array of "global" or "not_available" or "us"`
Restrict usage returned to the specified inference geo(s). Use `not_available` for models that do not support specifying `inference_geo`.
- `"global"`
- `"not_available"`
- `"us"`
- `limit: optional number`
Maximum number of time buckets to return in the response.
The default and max limits depend on `bucket_width`:
• `"1d"`: Default of 7 days, maximum of 31 days
• `"1h"`: Default of 24 hours, maximum of 168 hours
• `"1m"`: Default of 60 minutes, maximum of 1440 minutes
- `models: optional array of string`
Restrict usage returned to the specified model(s).
- `page: optional string`
Optionally set to the `next_page` token from the previous response.
- `service_account_ids: optional array of string`
Restrict usage returned to the specified service account ID(s).
- `service_tiers: optional array of "batch" or "flex" or "flex_discount" or 3 more`
Restrict usage returned to the specified service tier(s).
- `"batch"`
- `"flex"`
- `"flex_discount"`
- `"priority"`
- `"priority_on_demand"`
- `"standard"`
- `speeds: optional array of "fast" or "standard"`
Restrict usage returned to the specified speed(s) (Claude Code research preview).
Requires the `fast-mode-2026-02-01` beta header.
- `"fast"`
- `"standard"`
- `workspace_ids: optional array of string`
Restrict usage returned to the specified workspace ID(s).
### Header Parameters
- `"anthropic-beta": optional array of string`
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
### Returns
- `MessagesUsageReport object { data, has_more, next_page }`
- `data: array of object { ending_at, results, starting_at }`
List of time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no usage (their `results` list is empty). A page holds at most `limit` buckets.
- `ending_at: string`
End of the time bucket (exclusive) in RFC 3339 format.
- `results: array of object { account_id, api_key_id, cache_creation, 10 more }`
List of usage items for this time bucket. There may be multiple items if one or more `group_by[]` parameters are specified.
- `account_id: string or null`
ID of the user account that made the request. `null` if not grouping by account or for non-OAuth requests.
- `api_key_id: string or null`
ID of the API key used. `null` if not grouping by API key or for usage in the Anthropic Console.
- `cache_creation: object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }`
The number of input tokens for cache creation.
- `ephemeral_1h_input_tokens: number`
The number of input tokens used to create the 1 hour cache entry.
- `ephemeral_5m_input_tokens: number`
The number of input tokens used to create the 5 minute cache entry.
- `cache_read_input_tokens: number`
The number of input tokens read from the cache.
- `context_window: "0-200k" or "200k-1M" or null`
Context window used. `null` if not grouping by context window.
- `"0-200k"`
- `"200k-1M"`
- `inference_geo: "global" or "not_available" or "us" or null`
Inference geo used matching requests' `inference_geo` parameter if set, otherwise the workspace's `default_inference_geo`.
For models that do not support specifying `inference_geo` the value is `"not_available"`. Always `null` if not grouping by inference geo.
- `"global"`
- `"not_available"`
- `"us"`
- `model: string or null`
Model used. `null` if not grouping by model.
- `output_tokens: number`
The number of output tokens generated.
- `server_tool_use: object { web_search_requests }`
Server-side tool usage metrics.
- `web_search_requests: number`
The number of web search requests made.
- `service_account_id: string or null`
ID of the service account that made the request. `null` if not grouping by service account or for non-OIDC-federation requests.
- `service_tier: "batch" or "flex" or "flex_discount" or 3 more or null`
Service tier used. `null` if not grouping by service tier.
- `"batch"`
- `"flex"`
- `"flex_discount"`
- `"priority"`
- `"priority_on_demand"`
- `"standard"`
- `uncached_input_tokens: number`
The number of uncached input tokens processed.
- `workspace_id: string or null`
ID of the Workspace used. `null` if not grouping by workspace or for the default workspace.
- `starting_at: string`
Start of the time bucket (inclusive) in RFC 3339 format.
- `has_more: boolean`
Indicates if there are more results.
- `next_page: string or null`
Opaque cursor for the next page, or `null` when `has_more` is false. Pass it as the `page` parameter in the next request.
### Example
```http
curl https://api.anthropic.com/v1/organizations/usage_report/messages \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"ending_at": "2025-08-02T00:00:00Z",
"results": [
{
"account_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"cache_creation": {
"ephemeral_1h_input_tokens": 1000,
"ephemeral_5m_input_tokens": 500
},
"cache_read_input_tokens": 200,
"context_window": "0-200k",
"inference_geo": "global",
"model": "claude-opus-4-6",
"output_tokens": 500,
"server_tool_use": {
"web_search_requests": 10
},
"service_account_id": "svac_01Hk3R9TWxq7CfQak00OiVw4",
"service_tier": "standard",
"uncached_input_tokens": 1500,
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}
],
"starting_at": "2025-08-01T00:00:00Z"
}
],
"has_more": true,
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}
```
api/admin/users First recorded · 428 lines, first recorded
# Users ## Get User ### Path Parameters ### Returns ### Example #### Response ## List Users ### Query Parameters ### Returns ### Example #### Response ## Update User ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Remove User ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### User ### User Delete Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Users
url: https://platform.claude.com/docs/en/api/admin/users
---
# Users
## Get User
**get** `/v1/organizations/users/{user_id}`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Path Parameters
- `user_id: string`
ID of the User.
### Returns
- `User object { id, added_at, email, 3 more }`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "[email protected]",
"name": "Jane Doe",
"role": "user",
"type": "user"
}
```
## List Users
**get** `/v1/organizations/users`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Query Parameters
- `after_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- `before_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- `email: optional string`
Filter by user email.
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
- `roles: optional array of string`
Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR'ed together.
Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations (beta) accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.
### Returns
- `data: array of User`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
- `first_id: string or null`
First ID in the `data` list. Can be used as the `before_id` for the previous page.
- `has_more: boolean`
Indicates if there are more results in the requested page direction.
- `last_id: string or null`
Last ID in the `data` list. Can be used as the `after_id` for the next page.
### Example
```http
curl https://api.anthropic.com/v1/organizations/users \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "[email protected]",
"name": "Jane Doe",
"role": "user",
"type": "user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
```
## Update User
**post** `/v1/organizations/users/{user_id}`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Path Parameters
- `user_id: string`
ID of the User.
### Body Parameters
- `role: "billing" or "claude_code_user" or "developer" or 2 more`
New role for the User.
The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations (beta) accept `user` and `managed`.
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"user"`
### Returns
- `User object { id, added_at, email, 3 more }`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
Cut at 300 lines. The page has the rest.
api/admin/users/delete First recorded · 48 lines, first recorded
## Remove User ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Remove User
url: https://platform.claude.com/docs/en/api/admin/users/delete
---
## Remove User
**delete** `/v1/organizations/users/{user_id}`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Path Parameters
- `user_id: string`
ID of the User.
### Returns
- `id: string`
ID of the User.
- `type: "user_deleted"`
Deleted object type.
For Users, this is always `"user_deleted"`.
- `"user_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"type": "user_deleted"
}
```
api/admin/users/list First recorded · 126 lines, first recorded
## List Users ### Query Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: List Users
url: https://platform.claude.com/docs/en/api/admin/users/list
---
## List Users
**get** `/v1/organizations/users`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Query Parameters
- `after_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- `before_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- `email: optional string`
Filter by user email.
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
- `roles: optional array of string`
Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR'ed together.
Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations (beta) accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.
### Returns
- `data: array of User`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
- `first_id: string or null`
First ID in the `data` list. Can be used as the `before_id` for the previous page.
- `has_more: boolean`
Indicates if there are more results in the requested page direction.
- `last_id: string or null`
Last ID in the `data` list. Can be used as the `after_id` for the next page.
### Example
```http
curl https://api.anthropic.com/v1/organizations/users \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "[email protected]",
"name": "Jane Doe",
"role": "user",
"type": "user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
```
api/admin/users/retrieve First recorded · 87 lines, first recorded
## Get User ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Get User
url: https://platform.claude.com/docs/en/api/admin/users/retrieve
---
## Get User
**get** `/v1/organizations/users/{user_id}`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Path Parameters
- `user_id: string`
ID of the User.
### Returns
- `User object { id, added_at, email, 3 more }`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "[email protected]",
"name": "Jane Doe",
"role": "user",
"type": "user"
}
```
api/admin/users/update First recorded · 109 lines, first recorded
## Update User ### Path Parameters ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Update User
url: https://platform.claude.com/docs/en/api/admin/users/update
---
## Update User
**post** `/v1/organizations/users/{user_id}`
For Claude Enterprise organizations, this endpoint's availability is in beta.
### Path Parameters
- `user_id: string`
ID of the User.
### Body Parameters
- `role: "billing" or "claude_code_user" or "developer" or 2 more`
New role for the User.
The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations (beta) accept `user` and `managed`.
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"user"`
### Returns
- `User object { id, added_at, email, 3 more }`
- `id: string`
ID of the User.
- `added_at: string`
RFC 3339 datetime string indicating when the User joined the Organization.
- `email: string`
Email of the User.
- `name: string`
Name of the User.
- `role: "admin" or "billing" or "claude_code_user" or 6 more`
Organization role of the User.
- `"admin"`
- `"billing"`
- `"claude_code_user"`
- `"developer"`
- `"managed"`
- `"membership_admin"`
- `"owner"`
- `"primary_owner"`
- `"user"`
- `type: "user"`
Object type.
For Users, this is always `"user"`.
- `"user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"role": "user"
}'
```
#### Response
```json
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "[email protected]",
"name": "Jane Doe",
"role": "user",
"type": "user"
}
```
api/admin/workspaces First recorded · 2059 lines, first recorded
# Workspaces ## Create Workspace ### Header Parameters ### Body Parameters ### Returns ### Example #### Response ## Get Workspace ### Path Parameters ### Returns ### Example #### Response ## List Workspaces ### Query Parameters ### Returns ### Example #### Response ## Update Workspace ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Archive Workspace ### Path Parameters ### Returns ### Example #### Response # Members ## Create Workspace Member ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Get Workspace Member ### Path Parameters ### Returns ### Example #### Response ## List Workspace Members ### Path Parameters ### Query Parameters ### Returns ### Example #### Response ## Update Workspace Member ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Delete Workspace Member ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Workspace Member ### Member Delete Response # Rate Limits ## List Workspace Rate Limits ### Path Parameters ### Query Parameters ### Returns ### Example #### Response ## Domain Types ### Rate Limit List Response # Service Accounts ## Create Service Account Workspace Member ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response ## Get Service Account Workspace Member ### Path Parameters ### Header Parameters ### Returns ### Example #### Response ## List Service Account Workspace Members ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response ## Update Service Account Workspace Member ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response ## Delete Service Account Workspace Member ### Path Parameters ### Header Parameters ### Returns ### Example #### Response ## Domain Types ### Service Account Create Response ### Service Account Retrieve Response ### Service Account List Response ### Service Account Update Response ### Service Account Delete Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Workspaces
url: https://platform.claude.com/docs/en/api/admin/workspaces
---
# Workspaces
## Create Workspace
**post** `/v1/organizations/workspaces`
Create Workspace
### Header Parameters
- `"anthropic-beta": optional array of string`
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
### Body Parameters
- `name: string`
Name of the Workspace.
- `data_residency: optional object { allowed_inference_geos, default_inference_geo, workspace_geo } or null`
Data residency configuration for the workspace. If omitted, defaults to workspace_geo=`"us"`, allowed_inference_geos=`"unrestricted"`, and default_inference_geo=`"global"`.
- `allowed_inference_geos: optional array of "global" or "us" or "unrestricted" or null`
Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.
- `array of "global" or "us"`
- `"global"`
- `"us"`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: optional "global" or "us" or null`
Default inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is `"unrestricted"`.
- `"global"`
- `"us"`
- `workspace_geo: optional "us" or null`
Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.
- `"us"`
- `external_key_id: optional string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `tags: optional map[string] or null`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
### Returns
- `Workspace object { id, archived_at, compartment_id, 7 more }`
- `id: string`
ID of the Workspace.
- `archived_at: string or null`
RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
- `compartment_id: string`
Identifier for this Workspace's encryption compartment. When you configure a
customer-managed encryption key (CMEK) on AWS, reference this value in your
KMS key-policy condition so the key is scoped to this compartment. On GCP and
Azure, Anthropic enforces the compartment binding automatically; you do not
need to reference this value in your key configuration. See the CMEK integration guide for the
required key configuration, including the value used during key validation.
- `created_at: string`
RFC 3339 datetime string indicating when the Workspace was created.
- `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
Data residency configuration.
- `allowed_inference_geos: array of string or "unrestricted"`
Permitted inference geo values. 'unrestricted' means all geos are allowed.
- `array of string`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: string`
Default inference geo applied when requests omit the parameter.
- `workspace_geo: string`
Geographic region for workspace data storage. Immutable after creation.
- `display_color: string`
Hex color code representing the Workspace in the Anthropic Console.
- `external_key_id: string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `name: string`
Name of the Workspace.
- `tags: map[string]`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
- `type: "workspace"`
Object type.
For Workspaces, this is always `"workspace"`.
- `"workspace"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"name": "x",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"tags": {
"env": "prod",
"team": "platform"
}
}'
```
#### Response
```json
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
```
## Get Workspace
**get** `/v1/organizations/workspaces/{workspace_id}`
Get Workspace
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
### Returns
- `Workspace object { id, archived_at, compartment_id, 7 more }`
- `id: string`
ID of the Workspace.
- `archived_at: string or null`
RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
- `compartment_id: string`
Identifier for this Workspace's encryption compartment. When you configure a
customer-managed encryption key (CMEK) on AWS, reference this value in your
KMS key-policy condition so the key is scoped to this compartment. On GCP and
Azure, Anthropic enforces the compartment binding automatically; you do not
need to reference this value in your key configuration. See the CMEK integration guide for the
required key configuration, including the value used during key validation.
- `created_at: string`
RFC 3339 datetime string indicating when the Workspace was created.
- `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
Data residency configuration.
- `allowed_inference_geos: array of string or "unrestricted"`
Permitted inference geo values. 'unrestricted' means all geos are allowed.
- `array of string`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: string`
Default inference geo applied when requests omit the parameter.
- `workspace_geo: string`
Geographic region for workspace data storage. Immutable after creation.
- `display_color: string`
Hex color code representing the Workspace in the Anthropic Console.
- `external_key_id: string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `name: string`
Name of the Workspace.
- `tags: map[string]`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
- `type: "workspace"`
Object type.
For Workspaces, this is always `"workspace"`.
- `"workspace"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
Cut at 300 lines. The page has the rest.
api/admin/workspaces/archive First recorded · 124 lines, first recorded
## Archive Workspace ### Path Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Archive Workspace
url: https://platform.claude.com/docs/en/api/admin/workspaces/archive
---
## Archive Workspace
**post** `/v1/organizations/workspaces/{workspace_id}/archive`
Archive Workspace
### Path Parameters
- `workspace_id: string`
### Returns
- `Workspace object { id, archived_at, compartment_id, 7 more }`
- `id: string`
ID of the Workspace.
- `archived_at: string or null`
RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
- `compartment_id: string`
Identifier for this Workspace's encryption compartment. When you configure a
customer-managed encryption key (CMEK) on AWS, reference this value in your
KMS key-policy condition so the key is scoped to this compartment. On GCP and
Azure, Anthropic enforces the compartment binding automatically; you do not
need to reference this value in your key configuration. See the CMEK integration guide for the
required key configuration, including the value used during key validation.
- `created_at: string`
RFC 3339 datetime string indicating when the Workspace was created.
- `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
Data residency configuration.
- `allowed_inference_geos: array of string or "unrestricted"`
Permitted inference geo values. 'unrestricted' means all geos are allowed.
- `array of string`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: string`
Default inference geo applied when requests omit the parameter.
- `workspace_geo: string`
Geographic region for workspace data storage. Immutable after creation.
- `display_color: string`
Hex color code representing the Workspace in the Anthropic Console.
- `external_key_id: string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `name: string`
Name of the Workspace.
- `tags: map[string]`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
- `type: "workspace"`
Object type.
For Workspaces, this is always `"workspace"`.
- `"workspace"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/archive \
-X POST \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
```
api/admin/workspaces/create First recorded · 188 lines, first recorded
## Create Workspace ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Create Workspace
url: https://platform.claude.com/docs/en/api/admin/workspaces/create
---
## Create Workspace
**post** `/v1/organizations/workspaces`
Create Workspace
### Header Parameters
- `"anthropic-beta": optional array of string`
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
### Body Parameters
- `name: string`
Name of the Workspace.
- `data_residency: optional object { allowed_inference_geos, default_inference_geo, workspace_geo } or null`
Data residency configuration for the workspace. If omitted, defaults to workspace_geo=`"us"`, allowed_inference_geos=`"unrestricted"`, and default_inference_geo=`"global"`.
- `allowed_inference_geos: optional array of "global" or "us" or "unrestricted" or null`
Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.
- `array of "global" or "us"`
- `"global"`
- `"us"`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: optional "global" or "us" or null`
Default inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is `"unrestricted"`.
- `"global"`
- `"us"`
- `workspace_geo: optional "us" or null`
Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.
- `"us"`
- `external_key_id: optional string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `tags: optional map[string] or null`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
### Returns
- `Workspace object { id, archived_at, compartment_id, 7 more }`
- `id: string`
ID of the Workspace.
- `archived_at: string or null`
RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
- `compartment_id: string`
Identifier for this Workspace's encryption compartment. When you configure a
customer-managed encryption key (CMEK) on AWS, reference this value in your
KMS key-policy condition so the key is scoped to this compartment. On GCP and
Azure, Anthropic enforces the compartment binding automatically; you do not
need to reference this value in your key configuration. See the CMEK integration guide for the
required key configuration, including the value used during key validation.
- `created_at: string`
RFC 3339 datetime string indicating when the Workspace was created.
- `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
Data residency configuration.
- `allowed_inference_geos: array of string or "unrestricted"`
Permitted inference geo values. 'unrestricted' means all geos are allowed.
- `array of string`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: string`
Default inference geo applied when requests omit the parameter.
- `workspace_geo: string`
Geographic region for workspace data storage. Immutable after creation.
- `display_color: string`
Hex color code representing the Workspace in the Anthropic Console.
- `external_key_id: string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `name: string`
Name of the Workspace.
- `tags: map[string]`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
- `type: "workspace"`
Object type.
For Workspaces, this is always `"workspace"`.
- `"workspace"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"name": "x",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"tags": {
"env": "prod",
"team": "platform"
}
}'
```
#### Response
```json
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
```
api/admin/workspaces/list First recorded · 158 lines, first recorded
## List Workspaces ### Query Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: List Workspaces
url: https://platform.claude.com/docs/en/api/admin/workspaces/list
---
## List Workspaces
**get** `/v1/organizations/workspaces`
List Workspaces
### Query Parameters
- `after_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- `before_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- `include_archived: optional boolean`
Whether to include Workspaces that have been archived in the response
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
### Returns
- `data: array of Workspace`
- `id: string`
ID of the Workspace.
- `archived_at: string or null`
RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
- `compartment_id: string`
Identifier for this Workspace's encryption compartment. When you configure a
customer-managed encryption key (CMEK) on AWS, reference this value in your
KMS key-policy condition so the key is scoped to this compartment. On GCP and
Azure, Anthropic enforces the compartment binding automatically; you do not
need to reference this value in your key configuration. See the CMEK integration guide for the
required key configuration, including the value used during key validation.
- `created_at: string`
RFC 3339 datetime string indicating when the Workspace was created.
- `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
Data residency configuration.
- `allowed_inference_geos: array of string or "unrestricted"`
Permitted inference geo values. 'unrestricted' means all geos are allowed.
- `array of string`
- `"unrestricted"`
- `"unrestricted"`
- `default_inference_geo: string`
Default inference geo applied when requests omit the parameter.
- `workspace_geo: string`
Geographic region for workspace data storage. Immutable after creation.
- `display_color: string`
Hex color code representing the Workspace in the Anthropic Console.
- `external_key_id: string or null`
ID of the customer-managed encryption key (CMEK) configuration to use for this
Workspace. Setting this field requires CMEK to be enabled for your
organization. When set, data stored for this Workspace is encrypted with the
referenced key. Create key configurations with the External Keys API. This
field is write-once: once a key is attached to a Workspace it cannot be
detached or replaced. To rotate key material, rotate the underlying key on
your cloud KMS; the `external_key_id` stays the same.
- `name: string`
Name of the Workspace.
- `tags: map[string]`
User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
- `type: "workspace"`
Object type.
For Workspaces, this is always `"workspace"`.
- `"workspace"`
- `first_id: string or null`
First ID in the `data` list. Can be used as the `before_id` for the previous page.
- `has_more: boolean`
Indicates if there are more results in the requested page direction.
- `last_id: string or null`
Last ID in the `data` list. Can be used as the `after_id` for the next page.
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
```
api/admin/workspaces/members First recorded · 461 lines, first recorded
# Members ## Create Workspace Member ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Get Workspace Member ### Path Parameters ### Returns ### Example #### Response ## List Workspace Members ### Path Parameters ### Query Parameters ### Returns ### Example #### Response ## Update Workspace Member ### Path Parameters ### Body Parameters ### Returns ### Example #### Response ## Delete Workspace Member ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Workspace Member ### Member Delete Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Members
url: https://platform.claude.com/docs/en/api/admin/workspaces/members
---
# Members
## Create Workspace Member
**post** `/v1/organizations/workspaces/{workspace_id}/members`
Create Workspace Member
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
### Body Parameters
- `user_id: string`
ID of the User.
- `workspace_role: "workspace_admin" or "workspace_developer" or "workspace_restricted_developer" or "workspace_user"`
Role of the new Workspace Member. Cannot be "workspace_billing".
- `"workspace_admin"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Returns
- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
- `type: "workspace_member"`
Object type.
For Workspace Members, this is always `"workspace_member"`.
- `"workspace_member"`
- `user_id: string`
ID of the User.
- `workspace_id: string`
ID of the Workspace.
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
Role of the Workspace Member.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_role": "workspace_admin"
}'
```
#### Response
```json
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
```
## Get Workspace Member
**get** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
Get Workspace Member
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
- `user_id: string`
ID of the User.
### Returns
- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
- `type: "workspace_member"`
Object type.
For Workspace Members, this is always `"workspace_member"`.
- `"workspace_member"`
- `user_id: string`
ID of the User.
- `workspace_id: string`
ID of the Workspace.
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
Role of the Workspace Member.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
```
## List Workspace Members
**get** `/v1/organizations/workspaces/{workspace_id}/members`
List Workspace Members
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
### Query Parameters
- `after_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- `before_id: optional string`
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
### Returns
- `data: array of WorkspaceMember`
- `type: "workspace_member"`
Object type.
For Workspace Members, this is always `"workspace_member"`.
- `"workspace_member"`
- `user_id: string`
ID of the User.
- `workspace_id: string`
ID of the Workspace.
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
Role of the Workspace Member.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
- `first_id: string or null`
First ID in the `data` list. Can be used as the `before_id` for the previous page.
- `has_more: boolean`
Indicates if there are more results in the requested page direction.
- `last_id: string or null`
Last ID in the `data` list. Can be used as the `after_id` for the next page.
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
```
#### Response
```json
{
"data": [
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
```
## Update Workspace Member
**post** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
Update Workspace Member
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
- `user_id: string`
ID of the User.
### Body Parameters
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
New workspace role for the User.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Returns
- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
Cut at 300 lines. The page has the rest.
api/admin/workspaces/members/create First recorded · 92 lines, first recorded
## Create Workspace Member ### Path Parameters ### Body Parameters ### Returns ### Example #### Response
The first capture of this source. The page was already there, and this is what it said.
---
title: Create Workspace Member
url: https://platform.claude.com/docs/en/api/admin/workspaces/members/create
---
## Create Workspace Member
**post** `/v1/organizations/workspaces/{workspace_id}/members`
Create Workspace Member
### Path Parameters
- `workspace_id: string`
ID of the Workspace.
### Body Parameters
- `user_id: string`
ID of the User.
- `workspace_role: "workspace_admin" or "workspace_developer" or "workspace_restricted_developer" or "workspace_user"`
Role of the new Workspace Member. Cannot be "workspace_billing".
- `"workspace_admin"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Returns
- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
- `type: "workspace_member"`
Object type.
For Workspace Members, this is always `"workspace_member"`.
- `"workspace_member"`
- `user_id: string`
ID of the User.
- `workspace_id: string`
ID of the Workspace.
- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
Role of the Workspace Member.
- `"workspace_admin"`
- `"workspace_billing"`
- `"workspace_developer"`
- `"workspace_restricted_developer"`
- `"workspace_user"`
### Example
```http
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
-d '{
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_role": "workspace_admin"
}'
```
#### Response
```json
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
```