What this read moved
301–325 of 519This capture is too large to show at once. Changes 301-325 of 519 are below, significant first; the rest are on the following screens.
api/beta/organization/service_accounts Changed · +69 / -48 lines
api/beta/organization/service_accounts/archive Changed · +12 / -5 lines
api/beta/organization/service_accounts/create Changed · +12 / -5 lines
api/beta/organization/service_accounts/list Changed · +12 / -5 lines
api/beta/organization/service_accounts/retrieve Changed · +12 / -5 lines
api/beta/organization/service_accounts/update Changed · +12 / -5 lines
api/beta/organization/service_accounts/workspaces Changed · +30 / -19 lines
api/beta/organization/service_accounts/workspaces/add Changed · +12 / -5 lines
api/beta/organization/service_accounts/workspaces/list Changed · +12 / -5 lines
api/beta/organization/service_accounts/workspaces/remove Changed · +12 / -5 lines
api/beta/organization/spend_limits New page · 2144 lines, new page
# Spend Limits ## Set Spend Limit ### Body parameters ### Returns ### Example #### Response (200) ## Get Spend Limit ### Path parameters ### Returns ### Example #### Response (200) ## Delete Spend Limit ### Path parameters ### Returns ### Example #### Response (200) ## List Effective Spend Limits ### Query parameters ### Returns ### Example #### Response (200) ## Domain types ### Beta Spend Limit ### Beta Spend Summary ### Spend Limit Delete Response ## Spend Limits › Increase Requests ### List Spend Limit Increase Requests #### Query parameters #### Returns #### Example ##### Response (200) ### Get Spend Limit Increase Request #### Path parameters #### Returns #### Example ##### Response (200) ### Approve Spend Limit Increase Request #### Path parameters #### Body parameters #### Returns #### Example ##### Response (200) ### Deny Spend Limit Increase Request #### Path parameters #### Body parameters #### Returns #### Example ##### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Spend Limits
url: https://platform.claude.com/docs/en/api/beta/organization/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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `period: optional "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
### Returns
- `BetaSpendLimit object`
A configured spend limit: a cap on metered spend for one scope and period.
- `type: "spend_limit"`
Object type. Always `spend_limit`.
default: spend_limit
- `id: string`
Unique tagged ID of the spend limit (`spl_...`).
- `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`
RFC 3339 datetime at which the spend limit was created.
format: date-time
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
Length of the window the limit resets over. `amount` caps spend within each period.
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object or object or object or 2 more`
What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `updated_at: string`
RFC 3339 datetime at which the spend limit was last modified.
format: date-time
### Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-d '{
"amount": "50000",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"period": "monthly"
}'
```
#### Response (200)
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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
- `BetaSpendLimit object`
A configured spend limit: a cap on metered spend for one scope and period.
- `type: "spend_limit"`
Object type. Always `spend_limit`.
default: spend_limit
- `id: string`
Unique tagged ID of the spend limit (`spl_...`).
- `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`
RFC 3339 datetime at which the spend limit was created.
format: date-time
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
Length of the window the limit resets over. `amount` caps spend within each period.
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object or object or object or 2 more`
What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `updated_at: string`
RFC 3339 datetime at which the spend limit was last modified.
format: date-time
### Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response (200)
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/create New page · 171 lines, new page
# Set Spend Limit ## Body parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Set Spend Limit
url: https://platform.claude.com/docs/en/api/beta/organization/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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `period: optional "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
## Returns
- `BetaSpendLimit object`
A configured spend limit: a cap on metered spend for one scope and period.
- `type: "spend_limit"`
Object type. Always `spend_limit`.
default: spend_limit
- `id: string`
Unique tagged ID of the spend limit (`spl_...`).
- `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`
RFC 3339 datetime at which the spend limit was created.
format: date-time
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
Length of the window the limit resets over. `amount` caps spend within each period.
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object or object or object or 2 more`
What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `updated_at: string`
RFC 3339 datetime at which the spend limit was last modified.
format: date-time
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-d '{
"amount": "50000",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"period": "monthly"
}'
```
### Response (200)
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
api/beta/organization/spend_limits/delete New page · 46 lines, new page
# Delete Spend Limit ## Path parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Delete Spend Limit
url: https://platform.claude.com/docs/en/api/beta/organization/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
- `type: "spend_limit_deleted"`
default: spend_limit_deleted
- `id: string`
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```json
{
"id": "id",
"type": "spend_limit_deleted"
}
```
api/beta/organization/spend_limits/increase_requests New page · 1925 lines, new page
# Increase Requests ## List Spend Limit Increase Requests ### Query parameters ### Returns ### Example #### Response (200) ## Get Spend Limit Increase Request ### Path parameters ### Returns ### Example #### Response (200) ## Approve Spend Limit Increase Request ### Path parameters ### Body parameters ### Returns ### Example #### Response (200) ## Deny Spend Limit Increase Request ### Path parameters ### Body parameters ### Returns ### Example #### Response (200) ## Domain types ### Beta Spend Limit Increase Request ### Increase Request Approve Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Increase Requests
url: https://platform.claude.com/docs/en/api/beta/organization/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`
default: 20, maximum: 1000, minimum: 1
- `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 BetaSpendLimitIncreaseRequest`
- `type: "spend_limit_increase_request"`
default: spend_limit_increase_request
- `id: string`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `created_at: string`
format: date-time
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
format: date-time
- `resolved_by: object or object 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`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `ScopedAPIKeyActor object`
A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"`
default: scoped_api_key_actor
- `scoped_api_key_id: string`
- `spend_summary: BetaSpendSummary or null`
Per-member effective-limit report row (`GET /spend_limits/effective`).
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `source: object or object or object or 2 more`
Scope selecting a single member of the organization.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `next_page: string or null`
### Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response (200)
```json
{
"data": [
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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",
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/increase_requests/approve New page · 432 lines, new page
# Approve Spend Limit Increase Request ## Path parameters ## Body parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Approve Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/beta/organization/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
- `type: "spend_limit_increase_request"`
default: spend_limit_increase_request
- `id: string`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `created_at: string`
format: date-time
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
format: date-time
- `resolved_by: object or object 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`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `ScopedAPIKeyActor object`
A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"`
default: scoped_api_key_actor
- `scoped_api_key_id: string`
- `spend_limit: BetaSpendLimit`
A configured spend limit: a cap on metered spend for one scope and period.
- `type: "spend_limit"`
Object type. Always `spend_limit`.
default: spend_limit
- `id: string`
Unique tagged ID of the spend limit (`spl_...`).
- `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`
RFC 3339 datetime at which the spend limit was created.
format: date-time
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
Length of the window the limit resets over. `amount` caps spend within each period.
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object or object or object or 2 more`
What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `updated_at: string`
RFC 3339 datetime at which the spend limit was last modified.
format: date-time
- `spend_summary: BetaSpendSummary or null`
Per-member effective-limit report row (`GET /spend_limits/effective`).
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/increase_requests/deny New page · 312 lines, new page
# Deny Spend Limit Increase Request ## Path parameters ## Body parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Deny Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/beta/organization/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
- `BetaSpendLimitIncreaseRequest object`
- `type: "spend_limit_increase_request"`
default: spend_limit_increase_request
- `id: string`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `created_at: string`
format: date-time
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
format: date-time
- `resolved_by: object or object 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`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `ScopedAPIKeyActor object`
A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"`
default: scoped_api_key_actor
- `scoped_api_key_id: string`
- `spend_summary: BetaSpendSummary or null`
Per-member effective-limit report row (`GET /spend_limits/effective`).
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `source: object or object or object or 2 more`
Scope selecting a single member of the organization.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
## Example
```bash
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 "X-Api-Key: $ANTHROPIC_API_KEY" \
-d '{}'
```
### Response (200)
```json
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/increase_requests/list New page · 331 lines, new page
# List Spend Limit Increase Requests ## Query parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: List Spend Limit Increase Requests
url: https://platform.claude.com/docs/en/api/beta/organization/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`
default: 20, maximum: 1000, minimum: 1
- `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 BetaSpendLimitIncreaseRequest`
- `type: "spend_limit_increase_request"`
default: spend_limit_increase_request
- `id: string`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `created_at: string`
format: date-time
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
format: date-time
- `resolved_by: object or object 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`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `ScopedAPIKeyActor object`
A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"`
default: scoped_api_key_actor
- `scoped_api_key_id: string`
- `spend_summary: BetaSpendSummary or null`
Per-member effective-limit report row (`GET /spend_limits/effective`).
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `source: object or object or object or 2 more`
Scope selecting a single member of the organization.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
- `next_page: string or null`
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```json
{
"data": [
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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",
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/increase_requests/retrieve New page · 306 lines, new page
# Get Spend Limit Increase Request ## Path parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Spend Limit Increase Request
url: https://platform.claude.com/docs/en/api/beta/organization/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
- `BetaSpendLimitIncreaseRequest object`
- `type: "spend_limit_increase_request"`
default: spend_limit_increase_request
- `id: string`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `created_at: string`
format: date-time
- `period: "daily" or "monthly" or "weekly"`
- `"daily"`
- `"monthly"`
- `"weekly"`
- `resolved_at: string or null`
format: date-time
- `resolved_by: object or object 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`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `ScopedAPIKeyActor object`
A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"`
default: scoped_api_key_actor
- `scoped_api_key_id: string`
- `spend_summary: BetaSpendSummary or null`
Per-member effective-limit report row (`GET /spend_limits/effective`).
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `source: object or object or object or 2 more`
Scope selecting a single member of the organization.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `spend_limit_id: string`
- `status: "approved" or "denied" or "pending"`
- `"approved"`
- `"denied"`
- `"pending"`
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/$SPEND_LIMIT_INCREASE_REQUEST_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```json
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
Cut at 300 lines. The page has the rest.
api/beta/organization/spend_limits/list_effective New page · 206 lines, new page
# List Effective Spend Limits ## Query parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: List Effective Spend Limits
url: https://platform.claude.com/docs/en/api/beta/organization/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`
Maximum number of members per page. A member's period rows never split across pages, so a page may carry more rows than this. Defaults to `20`.
default: 20, maximum: 1000, minimum: 1
- `page: optional string`
Opaque cursor from a previous response's `next_page` field.
- `period: optional array of "daily" or "monthly" or "weekly"`
Restrict the report to these limit periods. Omit to return one row per period each member resolves a spend limit for.
maxItems: 3
- `"daily"`
- `"monthly"`
- `"weekly"`
- `user_ids: optional array of string`
Restrict the report to these members, by tagged user ID (`user_...`). At most 100 entries.
maxItems: 100
## Returns
- `data: array of BetaSpendSummary`
- `actor: object`
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.
- `type: "user_actor"`
Actor type. Always `user_actor`.
default: user_actor
- `deleted: boolean`
True only when the underlying account has been deleted.
default: false
- `email_address: string or null`
The user's email address. Null when the account is unavailable or has been deleted.
- `name: string or null`
The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.
- `user_id: string`
Tagged ID of the user.
- `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"`
Period this row's effective limit and spend are reported for.
- `"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`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `source: object or object or object or 2 more`
Scope selecting a single member of the organization.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `spend_limit_id: string`
- `next_page: string or null`
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits/effective \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```json
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "monthly",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit_id": "spend_limit_id"
}
],
"next_page": "next_page"
}
```
api/beta/organization/spend_limits/retrieve New page · 136 lines, new page
# Get Spend Limit ## Path parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Spend Limit
url: https://platform.claude.com/docs/en/api/beta/organization/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
- `BetaSpendLimit object`
A configured spend limit: a cap on metered spend for one scope and period.
- `type: "spend_limit"`
Object type. Always `spend_limit`.
default: spend_limit
- `id: string`
Unique tagged ID of the spend limit (`spl_...`).
- `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`
RFC 3339 datetime at which the spend limit was created.
format: date-time
- `currency: string`
ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `period: "daily" or "monthly" or "weekly"`
Length of the window the limit resets over. `amount` caps spend within each period.
- `"daily"`
- `"monthly"`
- `"weekly"`
- `scope: object or object or object or 2 more`
What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.
- `User object`
Scope selecting a single member of the organization.
- `type: "user"`
Scope type. Always `user` for this scope.
default: user
- `user_id: string`
Tagged ID of the member the spend limit applies to.
- `SeatTier object`
- `type: "seat_tier"`
default: seat_tier
- `seat_tier: string`
- `RBACGroup object`
- `type: "rbac_group"`
default: rbac_group
- `rbac_group_id: string`
- `OrganizationService object`
- `type: "organization_service"`
default: organization_service
- `service: string`
- `Organization object`
- `type: "organization"`
default: organization
- `updated_at: string`
RFC 3339 datetime at which the spend limit was last modified.
format: date-time
## Example
```bash
curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```json
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"period": "monthly",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
```
api/beta/organization/usage_report New page · 953 lines, new page
# Usage Report ## Get Messages Usage Report ### Query parameters ### Headers ### Returns ### Example #### Response (200) ## Get Claude Code Usage Report ### Query parameters ### Returns ### Example #### Response (200) ## Domain types ### Beta Claude Code Usage Report ### Beta Messages Usage Report
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Usage Report
url: https://platform.claude.com/docs/en/api/beta/organization/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.
format: date-time
- `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.
default: 1d
- `"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.
format: date-time
- `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 "standard" or "fast"`
Restrict usage returned to the specified speed(s) (Claude Code research preview).
Requires the `fast-mode-2026-02-01` beta header.
- `"standard"`
- `"fast"`
- `workspace_ids: optional array of string`
Restrict usage returned to the specified workspace ID(s).
### Headers
- `"anthropic-beta": optional array of AnthropicBeta`
Optional header to specify the beta version(s) you want to use.
- `string`
- `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
- `"message-batches-2024-09-24"`
- `"prompt-caching-2024-07-31"`
- `"computer-use-2024-10-22"`
- `"computer-use-2025-01-24"`
- `"pdfs-2024-09-25"`
- `"token-counting-2024-11-01"`
- `"token-efficient-tools-2025-02-19"`
- `"output-128k-2025-02-19"`
- `"files-api-2025-04-14"`
- `"mcp-client-2025-04-04"`
- `"mcp-client-2025-11-20"`
- `"dev-full-thinking-2025-05-14"`
- `"interleaved-thinking-2025-05-14"`
- `"code-execution-2025-05-22"`
- `"extended-cache-ttl-2025-04-11"`
- `"context-1m-2025-08-07"`
- `"context-management-2025-06-27"`
- `"model-context-window-exceeded-2025-08-26"`
- `"skills-2025-10-02"`
- `"fast-mode-2026-02-01"`
- `"output-300k-2026-03-24"`
- `"user-profiles-2026-03-24"`
- `"user-profiles-2026-08-18"`
- `"user-profiles-2026-09-04"`
- `"advisor-tool-2026-03-01"`
- `"managed-agents-2026-04-01"`
- `"cache-diagnosis-2026-04-07"`
- `"dreaming-2026-04-21"`
- `"thinking-token-count-2026-05-13"`
- `"server-side-fallback-2026-06-01"`
- `"server-side-fallback-2026-07-01"`
- `"fallback-credit-2026-06-01"`
- `"fallback-credit-2026-07-01"`
- `"agent-memory-2026-07-22"`
- `"mid-conversation-tool-changes-2026-07-01"`
- `"compact-2026-01-12"`
- `"computer-use-2025-11-24"`
- `"mcp-tunnels-2026-06-22"`
- `"structured-outputs-2025-11-13"`
- `"task-budgets-2026-03-13"`
- `"thinking-display-updates-2026-08-18"`
- `"ce-user-management-2026-07-13"`
- `"mid-conversation-output-config-2026-07-01"`
- `"thinking-binding-controls-2026-08-01"`
- `"mid-conversation-system-clear-at-2026-08-21"`
### Returns
- `BetaMessagesUsageReport object`
- `data: array of object`
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.
format: date-time
- `results: array of object`
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: BetaCacheCreation`
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.
default: 0, minimum: 0
- `ephemeral_5m_input_tokens: number`
The number of input tokens used to create the 5 minute cache entry.
default: 0, minimum: 0
- `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"`
Cut at 300 lines. The page has the rest.
api/beta/organization/usage_report/retrieve_claude_code New page · 271 lines, new page
# Get Claude Code Usage Report ## Query parameters ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Claude Code Usage Report
url: https://platform.claude.com/docs/en/api/beta/organization/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.
pattern: ^\d{4}-\d{2}-\d{2}$, format: date
- `limit: optional number`
Number of records per page (default: 20, max: 1000).
default: 20, maximum: 1000, minimum: 1
- `page: optional string`
Opaque cursor token from previous response's `next_page` field.
## Returns
- `BetaClaudeCodeUsageReport object`
- `data: array of object`
List of Claude Code usage records for the requested date.
- `actor: object or object`
The user or API key that performed the Claude Code actions.
- `UserActor object`
- `type: "user_actor"`
Actor type. Always `"user_actor"` for a user.
- `email_address: string`
Email address of the user who performed Claude Code actions.
- `APIActor object`
- `type: "api_actor"`
Actor type. Always `"api_actor"` for an API key.
- `api_key_name: string`
Name of the API key used to perform Claude Code actions.
- `core_metrics: object`
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`
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`).
format: date-time
- `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`
Token usage and cost breakdown by AI model used.
- `estimated_cost: object`
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`
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]`
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
```bash
curl https://api.anthropic.com/v1/organizations/usage_report/claude_code \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
### Response (200)
```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-5",
"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/beta/organization/usage_report/retrieve_messages New page · 403 lines, new page
# Get Messages Usage Report ## Query parameters ## Headers ## Returns ## Example ### Response (200)
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Messages Usage Report
url: https://platform.claude.com/docs/en/api/beta/organization/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.
format: date-time
- `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.
default: 1d
- `"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.
format: date-time
- `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 "standard" or "fast"`
Restrict usage returned to the specified speed(s) (Claude Code research preview).
Requires the `fast-mode-2026-02-01` beta header.
- `"standard"`
- `"fast"`
- `workspace_ids: optional array of string`
Restrict usage returned to the specified workspace ID(s).
## Headers
- `"anthropic-beta": optional array of AnthropicBeta`
Optional header to specify the beta version(s) you want to use.
- `string`
- `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
- `"message-batches-2024-09-24"`
- `"prompt-caching-2024-07-31"`
- `"computer-use-2024-10-22"`
- `"computer-use-2025-01-24"`
- `"pdfs-2024-09-25"`
- `"token-counting-2024-11-01"`
- `"token-efficient-tools-2025-02-19"`
- `"output-128k-2025-02-19"`
- `"files-api-2025-04-14"`
- `"mcp-client-2025-04-04"`
- `"mcp-client-2025-11-20"`
- `"dev-full-thinking-2025-05-14"`
- `"interleaved-thinking-2025-05-14"`
- `"code-execution-2025-05-22"`
- `"extended-cache-ttl-2025-04-11"`
- `"context-1m-2025-08-07"`
- `"context-management-2025-06-27"`
- `"model-context-window-exceeded-2025-08-26"`
- `"skills-2025-10-02"`
- `"fast-mode-2026-02-01"`
- `"output-300k-2026-03-24"`
- `"user-profiles-2026-03-24"`
- `"user-profiles-2026-08-18"`
- `"user-profiles-2026-09-04"`
- `"advisor-tool-2026-03-01"`
- `"managed-agents-2026-04-01"`
- `"cache-diagnosis-2026-04-07"`
- `"dreaming-2026-04-21"`
- `"thinking-token-count-2026-05-13"`
- `"server-side-fallback-2026-06-01"`
- `"server-side-fallback-2026-07-01"`
- `"fallback-credit-2026-06-01"`
- `"fallback-credit-2026-07-01"`
- `"agent-memory-2026-07-22"`
- `"mid-conversation-tool-changes-2026-07-01"`
- `"compact-2026-01-12"`
- `"computer-use-2025-11-24"`
- `"mcp-tunnels-2026-06-22"`
- `"structured-outputs-2025-11-13"`
- `"task-budgets-2026-03-13"`
- `"thinking-display-updates-2026-08-18"`
- `"ce-user-management-2026-07-13"`
- `"mid-conversation-output-config-2026-07-01"`
- `"thinking-binding-controls-2026-08-01"`
- `"mid-conversation-system-clear-at-2026-08-21"`
## Returns
- `BetaMessagesUsageReport object`
- `data: array of object`
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.
format: date-time
- `results: array of object`
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: BetaCacheCreation`
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.
default: 0, minimum: 0
- `ephemeral_5m_input_tokens: number`
The number of input tokens used to create the 5 minute cache entry.
default: 0, minimum: 0
- `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"`
Cut at 300 lines. The page has the rest.