billing

Create a budget for an organization

Creates a new budget for an organization. The authenticated user must be an organization admin or billing manager.

post/organizations/{org}/settings/billing/budgets

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Request body

budget_amountinteger

The budget amount in whole dollars. For license-based products, this represents the number of licenses.

prevent_further_usageboolean

Whether to prevent additional spending once the budget is exceeded. For user and multi_user_customer scopes, this must be true.

budget_scope'organization' | 'repository' | 'multi_user_customer' | 'user'

The scope of the budget for this organization. Use 'organization' for org-level budgets or 'repository' for repo-specific budgets within the organization. user and multi_user_customer scopes are only supported when budget_product_sku is ai_credits or premium_requests.

budget_entity_namestring

The name of the entity to apply the budget to

budget_product_skustring

A single product or SKU that will be covered in the budget

Response

Budget created successfully

messagestring required

A message indicating the result of the create operation

Example response

{
  "budget": {
    "budget_scope": "enterprise",
    "budget_entity_name": "example-repository-name",
    "budget_amount": 100,
    "prevent_further_usage": true,
    "budget_product_sku": "actions_linux",
    "budget_alerting": {
      "will_alert": true,
      "alert_recipients": [
        "mona",
        "lisa"
      ]
    }
  }
}

Changes