Claude Platform Docs

拒绝支出限额提额请求

client.Beta.Organization.SpendLimits.IncreaseRequests.Deny(ctx, spendLimitIncreaseRequestID, body) (*BetaSpendLimitIncreaseRequest, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

拒绝待处理的支出限额提额请求。

对 denied 状态幂等;拒绝已 approved 的请求会返回 400。除非设置了 suppress_notification,否则 Anthropic 会向请求者发送电子邮件。

Parameters
spendLimitIncreaseRequestID string⁠Path parameter

ID of the spend limit increase request.

body BetaOrganizationSpendLimitIncreaseRequestDenyParams
SuppressNotification param.Opt[bool] Optional
Returns
type BetaSpendLimitIncreaseRequest struct { Type: "spend_limit_increase_request"; ID; Actor; /* 6 more */ }
拒绝支出限额提额请求
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"),
	)
	betaSpendLimitIncreaseRequest, err := client.Beta.Organization.SpendLimits.IncreaseRequests.Deny(
		context.TODO(),
		"spend_limit_increase_request_id",
		anthropic.BetaOrganizationSpendLimitIncreaseRequestDenyParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaSpendLimitIncreaseRequest.ID)
}
Returns Examples
Response 200
{
  "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": "daily",
  "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": "daily",
    "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"
  },
  "status": "approved",
  "type": "spend_limit_increase_request"
}