---
title: "Update a budget"
method: PATCH
path: "/enterprises/{enterprise}/settings/billing/budgets/{budget_id}"
tags: ["billing"]
---

# Update a budget

`PATCH /enterprises/{enterprise}/settings/billing/budgets/{budget_id}`

Updates an existing budget for an enterprise. Enterprise owners and billing managers can update budgets scoped to the enterprise, all users in the enterprise, or any organization in it. Organization administrators can update budgets for their organizations, and repository-scoped budgets require administration of the repository's owning organization. A custom role holder with fine-grained write access to enterprise billing can update budgets scoped to a single user or a cost center, including all users in a cost center, without an additional administrator role; the role requirements above still apply to the other scopes. An installation access token for a GitHub App installed on the enterprise with write access to enterprise billing can update any budget in the enterprise.

## Path parameters

- `enterprise` string, required
- `budget_id` string, required

## Request body

- object
  - `budget_amount` integer — The budget amount in whole dollars. For license-based products, this represents the number of licenses.
  - `prevent_further_usage` boolean — Whether to prevent additional spending once the budget is exceeded. For budgets with `user` or `multi_user_customer` scope, this must remain `true`.
  - `budget_alerting` object
    - `will_alert` boolean — Whether alerts are enabled for this budget. Ignored for user-scope as alerting is always disabled for them.
    - `alert_recipients` string[] — Array of user login names who will receive alerts. Ignored for user-scope as alerting is always disabled for them.
  - `budget_scope` 'enterprise' | 'organization' | 'repository' | 'cost_center' | 'multi_user_customer' | 'multi_user_cost_center' | 'user' — The scope of the budget. - `enterprise`: Apply the budget to the entire enterprise. - `organization`: Apply the budget to a specific organization in the enterprise. - `repository`: Apply the budget to a specific repository. - `cost_center`: Apply the budget to a specific cost center. - `multi_user_customer`: Apply a universal budget to all users in the enterprise. - `multi_user_cost_center`: Apply a universal budget to all users in a cost center. - `user`: Apply the budget to a single user.
  - `budget_entity_name` string — The name of the entity to apply the budget to
  - `budget_type` union — The type of pricing model used by the budget. Determines how `budget_product_sku` is interpreted. - `BundlePricing`: Covers all AI credit SKUs. Set `budget_product_sku` to `ai_credits`. - `ProductPricing`: Covers all SKUs that belong to a product. Set `budget_product_sku` to a product such as `actions` or `packages`. - `SkuPricing`: Covers a single, specific SKU. Set `budget_product_sku` to a SKU such as `actions_linux`.
    - 'BundlePricing'
    - 'ProductPricing'
    - 'SkuPricing'
  - `budget_product_sku` string — A single product or SKU that will be covered in the budget
  - `user` string — The username of the user for `user` scope budgets.

## Response `200`

Budget updated successfully

- UpdateBudget
  - `message` string, required — A message indicating the result of the update operation
  - `budget` object, required
    - `id` string — ID of the budget.
    - `budget_scope` 'enterprise' | 'organization' | 'repository' | 'cost_center' | 'multi_user_customer' | 'multi_user_cost_center' | 'user' — The type of scope for the budget
    - `budget_entity_name` string — The name of the entity to apply the budget to
    - `user` string — The user login when the budget is scoped to a single user (`user` scope).
    - `consumed_amount` number — The consumed amount for the specified user within the budget. Only included for `user`-scoped budgets.
    - `budget_amount` integer — The budget amount in whole dollars. For license-based products, this represents the number of licenses.
    - `prevent_further_usage` boolean — Whether to prevent additional spending once the budget is exceeded
    - `budget_product_sku` string — A single product or sku to apply the budget to.
    - `budget_type` union — The type of pricing for the budget
      - 'ProductPricing'
      - 'SkuPricing'
    - `budget_alerting` object
      - `will_alert` boolean — Whether alerts are enabled for this budget. Ignored for user-scope as alerting is always disabled for them.
      - `alert_recipients` string[] — Array of user login names who will receive alerts. Ignored for user-scope as alerting is always disabled for them.

## Other responses

- `400` — Bad Request
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Budget not found or feature not enabled
- `422` — Validation failed, or the endpoint has been spammed.
- `500` — Internal server error
- `503` — Service unavailable

---

[API](https://skmtc.net/github/apis/enterprise-cloud.md) · [All operations](https://skmtc.net/github/apis/enterprise-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/enterprise-cloud/revisions/905703de9c0f/schema)
