Claude Platform Docs

Setujui Permintaan Kenaikan Batas Pengeluaran

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.

Path parameters
spend_limit_increase_request_id: string

ID of the spend limit increase request.

Body
amount: string

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

period: optional "daily" or "monthly" or "weekly" or null
One of the following:
"daily"
"monthly"
"weekly"
suppress_notification: optional boolean
Returns
id: string
actor: object{ deleted, email_address, name, 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.

deleted: boolean

True only when the underlying account has been deleted.

defaultfalse
email_address: string or null

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

name: string or null

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

type: "user_actor"

Actor type. Always user_actor.

defaultuser_actor
user_id: string

Tagged ID of the user.

created_at: string
formatdate-time
period: "daily" or "monthly" or "weekly"
One of the following:
"daily"
"monthly"
"weekly"
resolved_at: string or null
formatdate-time
resolved_by: object{ deleted, email_address, name, 2 more } or object{ scoped_api_key_id, type } or null

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.

One of the following:
UserActor object{ deleted, email_address, name, 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.

deleted: boolean

True only when the underlying account has been deleted.

defaultfalse
email_address: string or null

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

name: string or null

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

type: "user_actor"

Actor type. Always user_actor.

defaultuser_actor
user_id: string

Tagged ID of the user.

ScopedAPIKeyActor object{ scoped_api_key_id, type }

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

scoped_api_key_id: string
type: "scoped_api_key_actor"
defaultscoped_api_key_actor
spend_limit: SpendLimit { id, amount, created_at, 5 more }

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

spend_summary: SpendSummary { actor, amount, currency, 5 more } or null

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

status: "approved" or "denied" or "pending"
One of the following:
"approved"
"denied"
"pending"
type: "spend_limit_increase_request"
defaultspend_limit_increase_request
Setujui Permintaan Kenaikan Batas Pengeluaran
cURL
curl https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/$SPEND_LIMIT_INCREASE_REQUEST_ID/approve \
    -H 'Content-Type: application/json' \
    -H 'anthropic-version: 2023-06-01' \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
    -d '{
          "amount": "50000",
          "period": "monthly"
        }'
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": "monthly",
  "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",
    "period": "monthly",
    "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": "monthly",
    "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"
}