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

POST /organizations/{org}/settings/billing/budgets — GitHub API

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

GitHub API

Create 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
→ 371 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 POST 'https://api.github.com/organizations/example-org/settings/billing/budgets' \  -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_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 `user` and `multi_user_customer` scopes, this must be `true`.
budget_alerting body object No Request body field budget_alerting.
budget_scope body string No 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. `user` and `multi_user_customer` scopes are only supported when `budget_product_sku` is `ai_credits` or `premium_requests`.
budget_entity_name body string No The name of the entity to apply the budget to
budget_type body string No 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`.
budget_product_sku body string No A single product or SKU that will be covered in the budget
user body string No The username of the user for `user` scope budgets. This field is required when `budget_scope` is `user`.
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 provided, the budget will not expire. Only supported for budgets with `budget_scope` of `user`

Response 200 OK

{
  "message": "string",
  "budget": {
    "id": "string",
    "budget_scope": "enterprise",
    "budget_entity_name": "example-repository-name",
    "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.