v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
billing

Update a budget for an organization

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

patch/organizations/{org}/settings/billing/budgets/{budget_id}

Path parameters

orgstring required

The organization name. The name is not case sensitive.

budget_idstring required

The ID corresponding to 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. For budgets with user or multi_user_customer scope, this must remain true.

budget_scope'enterprise' | 'organization' | 'repository' | 'cost_center' | 'multi_user_customer' | 'user'

The scope of the budget for this organization.

  • organization: Apply the budget to the organization.
  • repository: Apply the budget to a specific repository in the organization.
  • multi_user_customer: Apply a universal budget to all users in the organization.
  • user: Apply the budget to a single user in the organization.
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

userstring

The username of the user for user scope budgets.

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",
    "user": "octocat",
    "consumed_amount": 42.5,
    "budget_amount": 100,
    "prevent_further_usage": true,
    "budget_product_sku": "actions_linux",
    "budget_alerting": {
      "will_alert": true,
      "alert_recipients": [
        "mona",
        "lisa"
      ]
    }
  }
}