Skip to content

Commit f950d49

Browse files
theomonfortCopilotcanuckjacqsophietheking
authored
Document required user field for user-scoped budget creation (#61625)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: canuckjacq <11161530+canuckjacq@users.noreply.github.com> Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com>
1 parent 2af837f commit f950d49

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

content/rest/billing/budgets.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,25 @@ category:
1212
- Administer enterprises and billing
1313
---
1414

15+
> [!IMPORTANT]
16+
> The request body schema below is missing a required field. When `budget_scope` is `user`, you must also include a `user` field set to the {% data variables.product.company_short %} username the budget applies to. If you omit this field, the API returns `HTTP 400: Missing required fields: budget_entity_name`. For user-scoped budgets, `budget_entity_name` can be an empty string.
17+
18+
The following example creates a user-scoped budget that limits a single user's monthly {% data variables.product.prodname_copilot_short %} {% data variables.product.prodname_ai_credits_short %} to $30 USD:
19+
20+
```json
21+
{
22+
"budget_amount": 30,
23+
"prevent_further_usage": true,
24+
"budget_scope": "user",
25+
"budget_entity_name": "",
26+
"budget_type": "BundlePricing",
27+
"budget_product_sku": "ai_credits",
28+
"budget_alerting": {
29+
"will_alert": false,
30+
"alert_recipients": []
31+
},
32+
"user": "USERNAME"
33+
}
34+
```
35+
1536
<!-- Content after this section is automatically generated -->

0 commit comments

Comments
 (0)