Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 1.26 KB

File metadata and controls

36 lines (32 loc) · 1.26 KB
title Budgets
intro Use the REST API to get budget information.
versions
fpt ghec
*
*
autogenerated rest
redirect_from
/rest/billing/enhanced-billing
allowTitleToDifferFromFilename true
category
Administer enterprises and billing

Important

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.

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:

{
  "budget_amount": 30,
  "prevent_further_usage": true,
  "budget_scope": "user",
  "budget_entity_name": "",
  "budget_type": "BundlePricing",
  "budget_product_sku": "ai_credits",
  "budget_alerting": {
    "will_alert": false,
    "alert_recipients": []
  },
  "user": "USERNAME"
}