Create a budget
Changed onCreates a new budget for an enterprise. Enterprise owners and billing managers can create budgets scoped to the enterprise, all users in the enterprise, or any organization in it. Organization administrators can create 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 create 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 create budgets for any target in the enterprise.
Request
- Base URL: https://api.github.com
- URL: https://api.github.com/enterprises/{enterprise}/settings/billing/budgets
- Auth: none declared
Path parameters
The slug version of the enterprise name.
Request body
Response
Budget created successfully
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"
]
},
"expires_at": "2026-12-31"
}
}Changes
- info
added the new optional request property
- info
added the optional property
/to the response with the status
- info
- warning
added the new
multi_user_cost_centerenum value to the/response property for the response status - info
added the new
multi_user_cost_centerenum value to the request property
- warning