apicheats.dev Cheat sheet Raw .md
POST

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

GitHub playground

Create a budget for an organization

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

9 body fields
  • budget_amount · optional · integer — The budget amount in whole dollars. For license-based products, this represents the number of licenses.
  • prevent_further_usage · optional · boolean — Whether to prevent additional spending once the budget is exceeded. For `user` and `multi_user_customer` scopes, this must be `true`.
  • budget_alerting · optional · object — Request body field budget_alerting.
  • budget_scope · optional · string — 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 · optional · string — The name of the entity to apply the budget to
  • budget_type · optional · string — 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 · optional · string — A single product or SKU that will be covered in the budget
  • user · optional · string — The username of the user for `user` scope budgets. This field is required when `budget_scope` is `user`.
  • expires_at · optional · string — 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`