apicheats.dev github/llms.txt Raw .md
PATCH

PATCH /organizations/{org}/settings/billing/budgets/{budget_id} — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Update a budget for an organization

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 305 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X PATCH 'https://api.github.com/organizations/example-org/settings/billing/budgets/budget-id' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10' \  -H 'Content-Type: application/json' \  -d '{}'

Parameters

Name In Type Required Description
org path string Yes The organization name. The name is not case sensitive.
budget_id path string Yes The ID corresponding to the budget.
budget_amount body integer No The budget amount in whole dollars. For license-based products, this represents the number of licenses.
prevent_further_usage body boolean No 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 body object No Request body field budget_alerting.
expires_at body string No The date the budget will expire in `YYYY-MM-DD` format. Only dates in the future are accepted. If not set, the budget will not expire. Setting to `null` or `0` will remove the expiration date from a budget if set. Only supported for existing user-scoped budgets.

Response 200 OK

{
  "message": "string",
  "budget": {
    "id": "string",
    "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_type": "ProductPricing",
    "budget_alerting": {
      "will_alert": true,
      "alert_recipients": [
        "mona",
        "lisa"
      ]
    },
    "expires_at": "2026-12-31"
  }
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.