Budgets

Use the REST API to get budget information.

Important

The request body schema below is missing a required field. When budget_scope is user, you must also include a user field set to the GitHub username the budget applies to. If you omit this field, the API returns HTTP 400: Missing required fields: budget_entity_name. For user-scoped budgets, budget_entity_name can be an empty string.

The following example creates a user-scoped budget that limits a single user's monthly Copilot AI credits to $30 USD:

{
  "budget_amount": 30,
  "prevent_further_usage": true,
  "budget_scope": "user",
  "budget_entity_name": "",
  "budget_type": "BundlePricing",
  "budget_product_sku": "ai_credits",
  "budget_alerting": {
    "will_alert": false,
    "alert_recipients": []
  },
  "user": "USERNAME"
}

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

Get all budgets for an organization

GET /organizations/{org}/settings/billing/budgets

Gets all budgets for an organization. The authenticated user must be an organization admin or billing manager.
Each page returns up to 100 budgets.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/organizations/ORG/settings/billing/budgets

Response schema (Status: 200):

Example 2: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/organizations/ORG/settings/billing/budgets

Response schema (Status: 200):

Create a budget for an organization

POST /organizations/{org}/settings/billing/budgets

Creates a new budget for an organization. The authenticated user must be an
organization admin or billing manager.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Create organization budget example

Request:

curl -L \
  -X POST \
  https://api.github.com/organizations/ORG/settings/billing/budgets \
  -d '{
  "budget_amount": 500,
  "prevent_further_usage": true,
  "budget_scope": "organization",
  "budget_entity_name": "",
  "budget_type": "ProductPricing",
  "budget_product_sku": "actions",
  "budget_alerting": {
    "will_alert": false,
    "alert_recipients": []
  }
}'

Response schema (Status: 200):

Get a budget by ID for an organization

GET /organizations/{org}/settings/billing/budgets/{budget_id}

Gets a budget by ID. The authenticated user must be an organization admin or billing manager.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/organizations/ORG/settings/billing/budgets/BUDGET_ID

Response schema (Status: 200):

Update a budget for an organization

PATCH /organizations/{org}/settings/billing/budgets/{budget_id}

Updates an existing budget for an organization. The authenticated user must be an organization admin or billing manager.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Update budget example

Request:

curl -L \
  -X PATCH \
  https://api.github.com/organizations/ORG/settings/billing/budgets/BUDGET_ID \
  -d '{
  "prevent_further_usage": false,
  "budget_amount": 10,
  "budget_alerting": {
    "will_alert": false,
    "alert_recipients": []
  }
}'

Response schema (Status: 200):

Delete a budget for an organization

DELETE /organizations/{org}/settings/billing/budgets/{budget_id}

Deletes a budget by ID for an organization. The authenticated user must be an organization admin or billing manager.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/organizations/ORG/settings/billing/budgets/BUDGET_ID

Response schema (Status: 200):