Claude Platform Docs

Approva richiesta di aumento del limite di spesa

IncreaseRequestApproveResponse Beta.Organization.SpendLimits.IncreaseRequests.Approve(parameters, cancellationToken = default)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

Approva una richiesta di aumento del limite di spesa in sospeso.

Scrive un limite di spesa per utente pari a amount per il richiedente e porta la richiesta allo stato approved. period ha come valore predefinito il periodo su cui il membro era bloccato. Anthropic invia un'email al richiedente a meno che suppress_notification non sia impostato.

Parameters
IncreaseRequestApproveParams parameters
required string spendLimitIncreaseRequestID⁠Path parameter

ID of the spend limit increase request.

required string amount

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

bool suppressNotification
Returns
class IncreaseRequestApproveResponse { Type = "spend_limit_increase_request"; ID; Actor; /* 7 more */ }
JsonElement Type = "spend_limit_increase_request"
required string ID
required Actor Actor
One of the following:
class BetaSpendLimitUserActor { Type = "user_actor"; Deleted; EmailAddress; /* 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.

JsonElement Type = "user_actor"

Actor type. Always user_actor.

required bool Deleted

True only when the underlying account has been deleted.

required string? EmailAddress

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

required string? Name

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

required string UserID

Tagged ID of the user.

class BetaSpendLimitScopedApiKeyActor { Type = "scoped_api_key_actor"; ScopedApiKeyID; }

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

JsonElement Type = "scoped_api_key_actor"
required string ScopedApiKeyID
required DateTimeOffset CreatedAt
formatdate-time
required BetaSpendLimitPeriod Period
One of the following:
Daily("daily")
Monthly("monthly")
Weekly("weekly")
required DateTimeOffset? ResolvedAt
formatdate-time
required ResolvedBy? ResolvedBy
One of the following:
class BetaSpendLimitUserActor { Type = "user_actor"; Deleted; EmailAddress; /* 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.

JsonElement Type = "user_actor"

Actor type. Always user_actor.

required bool Deleted

True only when the underlying account has been deleted.

required string? EmailAddress

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

required string? Name

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

required string UserID

Tagged ID of the user.

class BetaSpendLimitScopedApiKeyActor { Type = "scoped_api_key_actor"; ScopedApiKeyID; }

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

JsonElement Type = "scoped_api_key_actor"
required string ScopedApiKeyID
required BetaSpendLimit SpendLimit

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

required BetaSpendSummary? SpendSummary

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

One of the following:
Approved("approved")
Denied("denied")
Pending("pending")
Approva richiesta di aumento del limite di spesa
using System;
using Anthropic.Models.Beta.Organization.SpendLimits.IncreaseRequests;

IncreaseRequestApproveParams parameters = new()
{
    SpendLimitIncreaseRequestID = "spend_limit_increase_request_id",
    Amount = "50000",
};

var response = await client.Beta.Organization.SpendLimits.IncreaseRequests.Approve(parameters);

Console.WriteLine(response);
Returns Examples
Response 200
{
  "id": "id",
  "actor": {
    "deleted": true,
    "email_address": "email_address",
    "name": "name",
    "type": "user_actor",
    "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
  },
  "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_01WxYzAbCdEfGhJkMnPqRsTu"
  },
  "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_01WxYzAbCdEfGhJkMnPqRsTu"
    },
    "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_01WxYzAbCdEfGhJkMnPqRsTu"
    },
    "amount": "50000",
    "currency": "USD",
    "period": "daily",
    "period_to_date_spend": "12050.5",
    "scope": {
      "type": "user",
      "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
    },
    "source": {
      "type": "user",
      "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
    },
    "spend_limit_id": "spend_limit_id"
  },
  "status": "approved",
  "type": "spend_limit_increase_request"
}