Update a budget for an organization
Updates an existing budget for an organization. The authenticated user must be an organization admin or billing manager.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The ID corresponding to the budget.
Request Body required
Section titled “ Request Body required ”object
The budget amount in whole dollars. For license-based products, this represents the number of licenses.
Whether to prevent additional spending once the budget is exceeded. For budgets with user or multi_user_customer scope, this must remain true.
object
Whether alerts are enabled for this budget
Array of user login names who will receive alerts
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.
The name of the entity to apply the budget to
A single product or SKU that will be covered in the budget
The username of the user for user scope budgets.
Examples
Update budget example
{ "prevent_further_usage": false, "budget_amount": 10, "budget_alerting": { "will_alert": false, "alert_recipients": [] }}Responses
Section titled “ Responses ”Budget updated successfully
object
A message indicating the result of the update operation
object
ID of the budget.
The type of scope for the budget
The name of the entity to apply the budget to
The user login when the budget is scoped to a single user (user scope).
The consumed amount for the specified user within the budget. Only included for user-scoped budgets.
The budget amount in whole dollars. For license-based products, this represents the number of licenses.
Whether to prevent additional spending once the budget is exceeded
A single product or sku to apply the budget to.
object
Whether alerts are enabled for this budget
Array of user login names who will receive alerts
Examples
{ "message": "Budget successfully updated.", "budget": { "id": "2066deda-923f-43f9-88d2-62395a28c0cdd", "budget_type": "ProductPricing", "budget_product_sku": "actions_linux", "budget_scope": "repository", "budget_entity_name": "org-name/example-repo-name", "budget_amount": 10, "prevent_further_usage": true, "budget_alerting": { "will_alert": true, "alert_recipients": [ "mona", "lisa" ] } }}Bad Request
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Scim Error
object
Example generated
{ "message": "example", "documentation_url": "example", "detail": "example", "status": 1, "scimType": "example", "schemas": [ "example" ]}Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Budget not found or feature not enabled
Basic Error
object
Examples
{ "message": "Budget with ID 550e8400-e29b-41d4-a716-446655440000 not found.", "documentation_url": "https://docs.github.com/rest/billing/budgets#update-a-budget"}{ "message": "Not Found", "documentation_url": "https://docs.github.com/rest/billing/budgets#update-a-budget"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}Internal server error
Basic Error
object
Examples
{ "message": "Unable to update budget.", "documentation_url": "https://docs.github.com/rest/billing/budgets#update-a-budget"}