批准支出限额提额请求
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve
批准待处理的支出限额提额请求。
为请求者写入金额为 amount 的每用户支出限额,并将请求转换为 approved。period 默认为该成员被阻止时所在的周期。除非设置了 suppress_notification,否则 Anthropic 会向请求者发送电子邮件。
Path parameters
Body
Returns
批准支出限额提额请求
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"
}'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"
}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"
}