Claude Platform Docs

Setujui Permintaan Kenaikan Batas Pengeluaran

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

Menyetujui permintaan kenaikan batas pengeluaran yang tertunda.

Menulis batas pengeluaran per pengguna sebesar amount untuk pemohon dan mengubah status permintaan menjadi approved. period secara default adalah periode tempat anggota tersebut diblokir. Anthropic mengirim email kepada pemohon kecuali suppress_notification diatur.

Parameters
spend_limit_increase_request_id: String⁠Path parameter

ID of the spend limit increase request.

amount: String

New per-user spend limit as a non-negative integer decimal string (minor units).

One of the following:
:daily
:monthly
:weekly
suppress_notification: bool
Returns
class IncreaseRequestApproveResponse { type: :spend_limit_increase_request, id, actor, 7 more }
Setujui Permintaan Kenaikan Batas Pengeluaran
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

response = anthropic.beta.organization.spend_limits.increase_requests.approve(
  "spend_limit_increase_request_id",
  amount: "50000"
)

puts(response)
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_limit": {
    "id": "id",
    "amount": "50000",
    "created_at": "2019-12-27T18:11:19.117Z",
    "currency": "USD",
    "is_enabled": true,
    "period": "daily",
    "scope": {
      "type": "user",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
    },
    "type": "spend_limit",
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "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"
}