Claude Platform Docs

Excluir limite de gastos

client.Beta.Organization.SpendLimits.Delete(ctx, spendLimitID) (*BetaOrganizationSpendLimitDeleteResponse, error)
DELETE/v1/organizations/spend_limits/{spend_limit_id}

Exclui um limite de gastos.

Para uma organização Claude Enterprise, isso exclui uma substituição por usuário, e o membro volta a usar qualquer limite de gastos herdado nesse período. Suas linhas de nível de assento, de grupo e de organização não podem ser excluídas por meio deste endpoint. Uma organização do Claude Console exclui seus limites de organização e de workspace, mas não seu limite de usage_tier. A exclusão de limites de organização e de workspace pela API está em uma prévia de acesso antecipado.

Parameters
spendLimitID string⁠Path parameter

ID of the Spend Limit.

Returns
type BetaOrganizationSpendLimitDeleteResponse struct { Type: "spend_limit_deleted"; ID }
Type SpendLimitDeleted
defaultspend_limit_deleted
ID string
Excluir limite de gastos
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	spendLimit, err := client.Beta.Organization.SpendLimits.Delete(context.TODO(), "spend_limit_id")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", spendLimit.ID)
}
Returns Examples
Response 200
{
  "id": "id",
  "type": "spend_limit_deleted"
}