billing

Update a budget

[!NOTE] This endpoint is in public preview and is subject to change.

Updates an existing budget for an enterprise. The authenticated user must be an enterprise admin, organization admin, or billing manager of the enterprise.

patch/enterprises/{enterprise}/settings/billing/budgets/{budget_id}

Path parameters

enterprisestring required

The slug version of the enterprise name

budget_idstring required

The unique identifier of the budget

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

budget_scope'enterprise' | 'organization' | 'repository' | 'cost_center'

The scope of the budget

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 updated successfully

messagestring required

A message indicating the result of the update 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