Claude Platform Docs

刪除支出限制

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

刪除支出限制。

對於 Claude Enterprise 組織,此操作會刪除個別使用者的覆寫設定,該成員會改為套用該週期內任何繼承的支出限制。其席位層級、群組及組織層級的資料列無法透過此端點刪除。Claude Console 組織可刪除其組織與工作區限制,但無法刪除其 usage_tier 限制。透過 API 刪除組織與工作區限制目前處於搶先體驗預覽階段。

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
刪除支出限制
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"
}