Spend Limits
api/admin/spend_limits
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/admin/spend_limits Changed · +352 / -707 lines
### Body parameters #### Response (200) ### Path parameters #### Response (200) ### Path parameters #### Response (200) ### Query parameters #### Response (200) ## Domain types ## 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) ### Body Parameters #### Response ### Path Parameters #### Response ### Path Parameters #### Response ### Query Parameters #### Response ## Domain Types # Increase Requests ## List Spend Limit Increase Requests ### Query Parameters #### Response ## Get Spend Limit Increase Request ### Path Parameters #### Response ## Approve Spend Limit Increase Request ### Path Parameters ### Body Parameters #### Response ## Deny Spend Limit Increase Request ### Path Parameters ### Body Parameters #### Response ## Domain Types ### Spend Limit Increase Request ### Increase Request Approve Response
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
---- -title: Spend Limits -url: https://platform.claude.com/docs/en/api/admin/spend_limits ---- - # Spend Limits ## Set Spend Limit -**post** `/v1/organizations/spend_limits` +**POST** `/v1/organizations/spend_limits` Set a per-user spend limit override.
overwrites it in place. Only `scope.type: "user"` is accepted; seat-tier, group, and organization-level defaults are configured in claude.ai. -### Body Parameters +### 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 }` +- `scope: object` - `type: "user"` - - `"user"` + default: user - `user_id: string`
### Returns -- `SpendLimit object { id, amount, created_at, 5 more }` +- `SpendLimit object` - `id: string`
- `created_at: string` + format: date-time + - `currency: string` ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `"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 }` + - `scope: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `type: "spend_limit"` - - `"spend_limit"` + default: spend_limit - `updated_at: string` + format: date-time + ### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/spend_limits \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## Get Spend Limit -**get** `/v1/organizations/spend_limits/{spend_limit_id}` +**GET** `/v1/organizations/spend_limits/{spend_limit_id}` Retrieve a spend limit by ID. -### Path Parameters +### Path parameters - `spend_limit_id: string`
### Returns -- `SpendLimit object { id, amount, created_at, 5 more }` +- `SpendLimit object` - `id: string`
- `created_at: string` + format: date-time + - `currency: string` ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `"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 }` + - `scope: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `type: "spend_limit"` - - `"spend_limit"` + default: spend_limit - `updated_at: string` + format: date-time + ### Example -```http +```bash 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 +#### Response (200) ```json {
## Delete Spend Limit -**delete** `/v1/organizations/spend_limits/{spend_limit_id}` +**DELETE** `/v1/organizations/spend_limits/{spend_limit_id}` Delete a per-user spend limit override.
Seat-tier, group, and organization-level rows cannot be deleted via this endpoint. -### Path Parameters +### Path parameters - `spend_limit_id: string`
- `type: "spend_limit_deleted"` - - `"spend_limit_deleted"` + default: spend_limit_deleted ### Example -```http +```bash 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 +#### Response (200) ```json {
## List Effective Spend Limits -**get** `/v1/organizations/spend_limits/effective` +**GET** `/v1/organizations/spend_limits/effective` List each member's effective spend limit and period-to-date spend.
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 +### Query parameters - `limit: optional number` + default: 20, maximum: 1000, minimum: 1 + - `page: optional string` - `period: optional array of string` + maxItems: 3 + - `user_ids: optional array of string` + maxItems: 100 + ### Returns - `data: array of SpendSummary` - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string`
### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/spend_limits/effective \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Spend Limit -- `SpendLimit object { id, amount, created_at, 5 more }` +- `SpendLimit object` - `id: string`
- `created_at: string` + format: date-time + - `currency: string` ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `"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 }` + - `scope: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `type: "spend_limit"` - - `"spend_limit"` + default: spend_limit - `updated_at: string` + format: date-time + ### Spend Summary -- `SpendSummary object { actor, amount, currency, 5 more }` +- `SpendSummary object` Per-member effective-limit report row (GET /spend_limits/effective). - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string` ### Spend Limit Delete Response -- `SpendLimitDeleteResponse object { id, type }` +- `SpendLimitDeleteResponse object` - `id: string` - `type: "spend_limit_deleted"` - - `"spend_limit_deleted"` - -# Increase Requests - -## List Spend Limit Increase Requests - -**get** `/v1/organizations/spend_limit_increase_requests` + default: spend_limit_deleted + +## Spend Limits › 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 +#### Query parameters - `actor_ids: optional array of string`
- `limit: optional number` + default: 20, maximum: 1000, minimum: 1 + - `page: optional string` Opaque cursor from a previous response's `next_page`.
- `"pending"` -### Returns +#### Returns - `data: array of SpendLimitIncreaseRequest` - `id: string` - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - `created_at: string` + format: date-time + - `period: "daily" or "monthly" or "weekly"` - `"daily"`
- `resolved_at: string or null` - - `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } 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 { deleted, email_address, name, 2 more }` + - `UserActor object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - - `ScopedAPIKeyActor object { scoped_api_key_id, type }` + - `ScopedAPIKeyActor object` A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"` - - `"scoped_api_key_actor"` + default: 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 }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string`
- `type: "spend_limit_increase_request"` - - `"spend_limit_increase_request"` + default: spend_limit_increase_request - `next_page: string or null` -### Example - -```http +#### Example + +```bash curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +##### Response (200) ```json {
} ``` -## Get Spend Limit Increase Request - -**get** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}` +### 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 +#### Path parameters - `spend_limit_increase_request_id: string` ID of the spend limit increase request. -### Returns - -- `SpendLimitIncreaseRequest object { id, actor, created_at, 6 more }` +#### Returns + +- `SpendLimitIncreaseRequest object` - `id: string` - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - `created_at: string` + format: date-time + - `period: "daily" or "monthly" or "weekly"` - `"daily"`
- `resolved_at: string or null` - - `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } 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 { deleted, email_address, name, 2 more }` + - `UserActor object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - - `ScopedAPIKeyActor object { scoped_api_key_id, type }` + - `ScopedAPIKeyActor object` A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"` - - `"scoped_api_key_actor"` + default: 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 }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string`
- `type: "spend_limit_increase_request"` - - `"spend_limit_increase_request"` - -### Example - -```http + default: spend_limit_increase_request + +#### 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 "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +##### Response (200) ```json {
} ``` -## Approve Spend Limit Increase Request - -**post** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/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.
the member was blocked on. Anthropic emails the requester unless `suppress_notification` is set. -### Path Parameters +#### Path parameters - `spend_limit_increase_request_id: string` ID of the spend limit increase request. -### Body Parameters +#### Body parameters - `amount: string`
- `suppress_notification: optional boolean` -### Returns +#### Returns - `id: string` -- `actor: object { deleted, email_address, name, 2 more }` +- `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - `created_at: string` + format: date-time + - `period: "daily" or "monthly" or "weekly"` - `"daily"`
- `resolved_at: string or null` -- `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } 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 { deleted, email_address, name, 2 more }` + - `UserActor object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - - `ScopedAPIKeyActor object { scoped_api_key_id, type }` + - `ScopedAPIKeyActor object` A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"` - - `"scoped_api_key_actor"` + default: scoped_api_key_actor - `spend_limit: SpendLimit`
- `created_at: string` + format: date-time + - `currency: string` ISO 4217 code of the organization's billing currency; the unit for `amount`.
- `"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 }` + - `scope: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `type: "spend_limit"` - - `"spend_limit"` + default: spend_limit - `updated_at: string` + format: date-time + - `spend_summary: SpendSummary or null` Per-member effective-limit report row (GET /spend_limits/effective). - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string`
- `type: "spend_limit_increase_request"` - - `"spend_limit_increase_request"` - -### Example - -```http + default: spend_limit_increase_request + +#### Example + +```bash 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' \
}' ``` -#### Response +##### Response (200) ```json {
} ``` -## Deny Spend Limit Increase Request - -**post** `/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/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 +#### Path parameters - `spend_limit_increase_request_id: string` ID of the spend limit increase request. -### Body Parameters +#### Body parameters - `suppress_notification: optional boolean` -### Returns - -- `SpendLimitIncreaseRequest object { id, actor, created_at, 6 more }` +#### Returns + +- `SpendLimitIncreaseRequest object` - `id: string` - - `actor: object { deleted, email_address, name, 2 more }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - `created_at: string` + format: date-time + - `period: "daily" or "monthly" or "weekly"` - `"daily"`
- `resolved_at: string or null` - - `resolved_by: object { deleted, email_address, name, 2 more } or object { scoped_api_key_id, type } 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 { deleted, email_address, name, 2 more }` + - `UserActor object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: string` - - `ScopedAPIKeyActor object { scoped_api_key_id, type }` + - `ScopedAPIKeyActor object` A scoped Admin API key acting on behalf of the organization.
- `type: "scoped_api_key_actor"` - - `"scoped_api_key_actor"` + default: 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 }` + - `actor: object` A user within the organization. `name` and `email_address` are null when the underlying account is unavailable or has been deleted;
- `deleted: boolean` + default: false + - `email_address: string or null` - `name: string or null` - `type: "user_actor"` - - `"user_actor"` + default: user_actor - `user_id: 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 }` + - `scope: object` - `type: "user"` - - `"user"` + default: 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 }` + - `source: object or object or object or 2 more` + + - `User object` - `type: "user"` - - `"user"` + default: user - `user_id: string` - - `SeatTier object { seat_tier, type }` + - `SeatTier object` - `seat_tier: string` - `type: "seat_tier"` - - `"seat_tier"` - - - `RbacGroup object { rbac_group_id, type }` + default: seat_tier + + - `RbacGroup object` - `rbac_group_id: string` - `type: "rbac_group"` - - `"rbac_group"` - - - `OrganizationService object { service, type }` + default: rbac_group + + - `OrganizationService object` - `service: string` - `type: "organization_service"` - - `"organization_service"` - - - `Organization object { type }` + default: organization_service + + - `Organization object` - `type: "organization"` - - `"organization"` + default: organization - `spend_limit_id: string`
- `type: "spend_limit_increase_request"` - - `"spend_limit_increase_request"` - -### Example - -```http + default: spend_limit_increase_request + +#### 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' \
-d '{}' ``` -#### Response +##### Response (200) ```json {
"type": "spend_limit_increase_request" } ``` - -## Domain Types - -### Spend Limit Increase Request - -- `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"` - -### Increase Request Approve Response - -- `IncreaseRequestApproveResponse object { id, actor, created_at, 7 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_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"`