Claude Platform Docs

Limites de gastos

Definir limite de gastos
beta.organization.spend_limits.set(**kwargs) -> BetaSpendLimit
POST/v1/organizations/spend_limits

Define um limite de gastos.

Obter limite de gastos
beta.organization.spend_limits.retrieve(spend_limit_id) -> BetaSpendLimit
GET/v1/organizations/spend_limits/{spend_limit_id}

Recupere um limite de gastos por ID.

Excluir limite de gastos
beta.organization.spend_limits.delete(spend_limit_id) -> SpendLimitDeleteResponse
DELETE/v1/organizations/spend_limits/{spend_limit_id}

Exclui um limite de gastos.

Listar limites de gastos
beta.organization.spend_limits.list(**kwargs) -> SyncPageCursor[BetaSpendLimit]
GET/v1/organizations/spend_limits

Lista os limites de gastos da organização.

Models
class BetaSpendLimit: type: "spend_limit"; id; amount; ... # 6 more

A configured spend limit: a cap on metered spend for one scope and period.

class BetaSpendLimitOrganizationScope: type: "organization"
type: Literal["organization"]
defaultorganization
class BetaSpendLimitOrganizationServiceScope: type: "organization_service"; service
type: Literal["organization_service"]
defaultorganization_service
service: str
type BetaSpendLimitPeriod = Literal["daily", "monthly", "weekly"]
One of the following:
"daily"
"monthly"
"weekly"
class BetaSpendLimitRBACGroupScope: type: "rbac_group"; rbac_group_id
type: Literal["rbac_group"]
defaultrbac_group
rbac_group_id: str
class BetaSpendLimitScopedAPIKeyActor: type: "scoped_api_key_actor"; scoped_api_key_id

A scoped Admin API key acting on behalf of the organization.

type: Literal["scoped_api_key_actor"]
defaultscoped_api_key_actor
scoped_api_key_id: str
class BetaSpendLimitSeatTierScope: type: "seat_tier"; seat_tier
type: Literal["seat_tier"]
defaultseat_tier
seat_tier: str
class BetaSpendLimitUserActor: type: "user_actor"; deleted; email_address; ... # 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.

type: Literal["user_actor"]

Actor type. Always user_actor.

defaultuser_actor
deleted: bool

True only when the underlying account has been deleted.

defaultfalse
email_address: Optional[str]

The user's email address. Null when the account is unavailable or has been deleted.

name: Optional[str]

The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.

user_id: str

Tagged ID of the user.

class BetaSpendLimitUserScope: type: "user"; user_id

Scope selecting a single member of the organization.

type: Literal["user"]

Scope type. Always user for this scope.

defaultuser
user_id: str

Tagged ID of the member the spend limit applies to.

class BetaSpendLimitWorkspaceScope: type: "workspace"; workspace_id

Scope selecting one workspace of a Claude Console organization.

type: Literal["workspace"]

Scope type. Always workspace for this scope.

defaultworkspace
workspace_id: str

Tagged ID of the workspace the spend limit applies to.

class BetaSpendSummary: actor; amount; currency; ... # 5 more

Per-member effective-limit report row (GET /spend_limits/effective).

class SpendLimitDeleteResponse: type: "spend_limit_deleted"; id
type: Literal["spend_limit_deleted"]
defaultspend_limit_deleted
id: str

Limites de gastosEfetivos

Listar limites de gastos efetivos
beta.organization.spend_limits.effective.list(**kwargs) -> SyncPageCursor[BetaSpendSummary]
GET/v1/organizations/spend_limits/effective

Lista o limite de gastos efetivo de cada membro e os gastos acumulados no período.

Limites de gastosSolicitações de aumento

Listar solicitações de aumento de limite de gastos
beta.organization.spend_limits.increase_requests.list(**kwargs) -> SyncPageCursor[BetaSpendLimitIncreaseRequest]
GET/v1/organizations/spend_limit_increase_requests

Liste as solicitações de aumento de limite de gastos, mais recentes primeiro.

Obter solicitação de aumento de limite de gastos
beta.organization.spend_limits.increase_requests.retrieve(spend_limit_increase_request_id) -> BetaSpendLimitIncreaseRequest
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

Recupere uma solicitação de aumento de limite de gastos.

Aprovar solicitação de aumento de limite de gastos
beta.organization.spend_limits.increase_requests.approve(spend_limit_increase_request_id, **kwargs) -> IncreaseRequestApproveResponse
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

Aprove uma solicitação pendente de aumento de limite de gastos.

Negar solicitação de aumento de limite de gastos
beta.organization.spend_limits.increase_requests.deny(spend_limit_increase_request_id, **kwargs) -> BetaSpendLimitIncreaseRequest
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

Negue uma solicitação pendente de aumento de limite de gastos.