GitHub: Billing schemas
15 GitHub schemas with complete fields and constraints.
← Billing operations · All schemas
Create a budget for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
budget | object | Required within parent | |
budget.budget_alerting | object | Optional | |
budget.budget_alerting.alert_recipients | array | Optional | Array of user login names who will receive alerts. Rejected for user-scope as alerting is always disabled for them. |
budget.budget_alerting.alert_recipients[] | string | Each item | |
budget.budget_alerting.will_alert | boolean | Optional | Whether alerts are enabled for this budget. Rejected for user-scope as alerting is always disabled for them. |
budget.budget_amount | JSON | Optional | |
budget.budget_amount (anyOf 1) | integer | Alternative | The budget amount in whole dollars. For license-based products, this represents the number of licenses. Minimum: 0 |
budget.budget_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
budget.budget_entity_name | string | Optional | The name of the entity to apply the budget to |
budget.budget_product_sku | string | Optional | A single product or sku to apply the budget to. |
budget.budget_scope | string | Optional | The type of scope for the budget Known values: enterprise, organization, repository, cost_center, multi_user_customer, multi_user_cost_center, user |
budget.budget_type | JSON | Optional | The type of pricing for the budget |
budget.budget_type (anyOf 1) | string | Alternative | Known values: ProductPricing |
budget.budget_type (anyOf 2) | string | Alternative | Known values: SkuPricing |
budget.expires_at | string | Optional | 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` Format: date |
budget.id | string | Optional | ID of the budget. |
budget.prevent_further_usage | boolean | Optional | Whether to prevent additional spending once the budget is exceeded |
message | string | Required within parent | A message indicating the result of the create operation |
Delete a budget for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | The ID of the deleted budget |
message | string | Required within parent | A message indicating the result of the deletion operation |
Get a budget by ID for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
budget_alerting | object | Required within parent | |
budget_alerting.alert_recipients | array | Optional | Array of user login names who will receive alerts. Present but not applicable for user-scope as alerting is always disabled for them. |
budget_alerting.alert_recipients[] | string | Each item | |
budget_alerting.will_alert | boolean | Optional | Whether alerts are enabled for this budget. Present but not applicable for user-scope as alerting is always disabled for them. |
budget_amount | JSON | Required within parent | |
budget_amount (anyOf 1) | integer | Alternative | The budget amount in whole dollars. For license-based products, this represents the number of licenses. |
budget_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
budget_entity_name | string | Required within parent | The name of the entity to apply the budget to |
budget_product_sku | string | Required within parent | A single product or sku to apply the budget to. |
budget_scope | string | Required within parent | The type of scope for the budget Known values: enterprise, organization, repository, cost_center, multi_user_customer, multi_user_cost_center, user |
budget_type | JSON | Required within parent | The type of pricing for the budget |
budget_type (anyOf 1) | string | Alternative | Known values: ProductPricing |
budget_type (anyOf 2) | string | Alternative | Known values: SkuPricing |
consumed_amount | JSON | Optional | |
consumed_amount (anyOf 1) | number | Alternative | The current usage amount counted toward the budget. How usage is calculated may vary by budget type. |
consumed_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | ID of the budget. |
prevent_further_usage | boolean | Required within parent | Whether to prevent additional spending once the budget is exceeded |
user | string | Optional | The user login when the budget is scoped to a single user (`user` scope). |
Get all budgets for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
budgets | array | Required within parent | Array of budget objects for the enterprise |
budgets[] | Model | Each item | Expand Get all budgets for an organization — response body — budgets item |
effective_budget | object | Optional | Effective user-level budget details returned when the response is scoped with the `user` query parameter. |
effective_budget.budget_amount | JSON | Required within parent | |
effective_budget.budget_amount (anyOf 1) | integer | Alternative | The budget amount for the effective budget. |
effective_budget.budget_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
effective_budget.consumed_amount | JSON | Required within parent | |
effective_budget.consumed_amount (anyOf 1) | number | Alternative | The consumed amount for the specified user within the effective budget. |
effective_budget.consumed_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
effective_budget.id | string | Required within parent | The unique identifier of the effective budget. |
has_next_page | boolean | Optional | Indicates if there are more pages of results available |
total_count | JSON | Optional | |
total_count (anyOf 1) | integer | Alternative | Total number of budgets matching the query |
total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
user | string | Optional | User login included when the response is scoped with the `user` query parameter. |
Referenced models: Get all budgets for an organization — response body — budgets item
Get all budgets for an organization — response body — budgets item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
budget_alerting | object | Required within parent | |
budget_alerting.alert_recipients | array | Required within parent | Array of user login names who will receive alerts. Ignored for user-scope as alerting is disabled for them. |
budget_alerting.alert_recipients[] | string | Each item | |
budget_alerting.will_alert | boolean | Required within parent | Whether alerts are enabled for this budget. Ignored for user-scope as alerting is disabled for them. |
budget_amount | JSON | Required within parent | |
budget_amount (anyOf 1) | integer | Alternative | The budget amount limit in whole dollars. For license-based products, this represents the number of licenses. |
budget_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
budget_entity_name | string | Optional | The name of the entity for the budget (enterprise does not require a name). |
budget_product_sku | string | Required within parent | A single product or sku to apply the budget to. |
budget_scope | string | Required within parent | The scope of the budget Known values: enterprise, organization, repository, cost_center, multi_user_customer, multi_user_cost_center, user |
budget_type | JSON | Required within parent | The type of pricing for the budget |
budget_type (anyOf 1) | string | Alternative | Known values: SkuPricing |
budget_type (anyOf 2) | string | Alternative | Known values: ProductPricing |
consumed_amount | JSON | Optional | |
consumed_amount (anyOf 1) | number | Alternative | The amount consumed for a user-scoped budget, or for a multi-user budget when filtering by user. |
consumed_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
expires_at | string | Optional | 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` Format: date |
id | string | Required within parent | The unique identifier for the budget |
prevent_further_usage | boolean | Required within parent | The type of limit enforcement for the budget |
user | string | Optional | The user login when the budget is scoped to a single user (`user` scope). |
Get billing AI credit usage report for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
model | string | Optional | The model for the usage report. |
product | string | Optional | The product for the usage report. |
timePeriod | Model | Required within parent | Expand Get billing usage summary for a user — response body — time Period |
usageItems | array | Required within parent | |
usageItems[] | Model | Each item | Expand Get billing AI credit usage report for a user — response body — usage Items item |
user | string | Required within parent | The unique identifier of the user. |
Referenced models: Get billing usage summary for a user — response body — time Period, Get billing AI credit usage report for a user — response body — usage Items item
Get billing AI credit usage report for a user — response body — usage Items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
discountAmount | JSON | Required within parent | |
discountAmount (anyOf 1) | number | Alternative | Discount amount of the usage line item. |
discountAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discountQuantity | JSON | Required within parent | |
discountQuantity (anyOf 1) | number | Alternative | Discount quantity of the usage line item. |
discountQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
grossAmount | JSON | Required within parent | |
grossAmount (anyOf 1) | number | Alternative | Gross amount of the usage line item. |
grossAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
grossQuantity | JSON | Required within parent | |
grossQuantity (anyOf 1) | number | Alternative | Gross quantity of the usage line item. |
grossQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
model | string | Required within parent | Model name. |
netAmount | JSON | Required within parent | |
netAmount (anyOf 1) | number | Alternative | Net amount of the usage line item. |
netAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
netQuantity | JSON | Required within parent | |
netQuantity (anyOf 1) | number | Alternative | Net quantity of the usage line item. |
netQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pricePerUnit | JSON | Required within parent | |
pricePerUnit (anyOf 1) | number | Alternative | Price per unit of the usage line item. |
pricePerUnit (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
product | string | Required within parent | Product name. |
sku | string | Required within parent | SKU name. |
unitType | string | Required within parent | Unit type of the usage line item. |
Get billing AI credit usage report for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
model | string | Optional | The model for the usage report. |
organization | string | Required within parent | The unique identifier of the organization. |
product | string | Optional | The product for the usage report. |
timePeriod | Model | Required within parent | Expand Get billing usage summary for a user — response body — time Period |
usageItems | array | Required within parent | |
usageItems[] | Model | Each item | Expand Get billing AI credit usage report for a user — response body — usage Items item |
user | string | Optional | The name of the user for the usage report. |
Referenced models: Get billing usage summary for a user — response body — time Period, Get billing AI credit usage report for a user — response body — usage Items item
Get billing usage report for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
usageItems | array | Optional | |
usageItems[] | object | Each item | |
usageItems[].date | string | Required within parent | Date of the usage line item. |
usageItems[].discountAmount | JSON | Required within parent | |
usageItems[].discountAmount (anyOf 1) | number | Alternative | Discount amount of the usage line item. |
usageItems[].discountAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].grossAmount | JSON | Required within parent | |
usageItems[].grossAmount (anyOf 1) | number | Alternative | Gross amount of the usage line item. |
usageItems[].grossAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].netAmount | JSON | Required within parent | |
usageItems[].netAmount (anyOf 1) | number | Alternative | Net amount of the usage line item. |
usageItems[].netAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].pricePerUnit | JSON | Required within parent | |
usageItems[].pricePerUnit (anyOf 1) | number | Alternative | Price per unit of the usage line item. |
usageItems[].pricePerUnit (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].product | string | Required within parent | Product name. |
usageItems[].quantity | JSON | Required within parent | |
usageItems[].quantity (anyOf 1) | integer | Alternative | Quantity of the usage line item. |
usageItems[].quantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].repositoryName | string | Optional | Name of the repository. |
usageItems[].sku | string | Required within parent | SKU name. |
usageItems[].unitType | string | Required within parent | Unit type of the usage line item. |
Get billing usage report for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
usageItems | array | Optional | |
usageItems[] | object | Each item | |
usageItems[].date | string | Required within parent | Date of the usage line item. |
usageItems[].discountAmount | JSON | Required within parent | |
usageItems[].discountAmount (anyOf 1) | number | Alternative | Discount amount of the usage line item. |
usageItems[].discountAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].grossAmount | JSON | Required within parent | |
usageItems[].grossAmount (anyOf 1) | number | Alternative | Gross amount of the usage line item. |
usageItems[].grossAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].netAmount | JSON | Required within parent | |
usageItems[].netAmount (anyOf 1) | number | Alternative | Net amount of the usage line item. |
usageItems[].netAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].organizationName | string | Required within parent | Name of the organization. |
usageItems[].pricePerUnit | JSON | Required within parent | |
usageItems[].pricePerUnit (anyOf 1) | number | Alternative | Price per unit of the usage line item. |
usageItems[].pricePerUnit (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].product | string | Required within parent | Product name. |
usageItems[].quantity | JSON | Required within parent | |
usageItems[].quantity (anyOf 1) | integer | Alternative | Quantity of the usage line item. |
usageItems[].quantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
usageItems[].repositoryName | string | Optional | Name of the repository. |
usageItems[].sku | string | Required within parent | SKU name. |
usageItems[].unitType | string | Required within parent | Unit type of the usage line item. |
Get billing usage summary for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
product | string | Optional | The product for the usage report. |
repository | string | Optional | The name of the repository for the usage report. |
sku | string | Optional | The SKU for the usage report. |
timePeriod | Model | Required within parent | Expand Get billing usage summary for a user — response body — time Period |
usageItems | array | Required within parent | |
usageItems[] | Model | Each item | Expand Get billing usage summary for a user — response body — usage Items item |
user | string | Required within parent | The unique identifier of the user. |
Referenced models: Get billing usage summary for a user — response body — time Period, Get billing usage summary for a user — response body — usage Items item
Get billing usage summary for a user — response body — time Period
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
day | JSON | Optional | |
day (anyOf 1) | integer | Alternative | The day for the usage report. |
day (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
month | JSON | Optional | |
month (anyOf 1) | integer | Alternative | The month for the usage report. |
month (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
year | JSON | Required within parent | |
year (anyOf 1) | integer | Alternative | The year for the usage report. |
year (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Get billing usage summary for a user — response body — usage Items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
discountAmount | JSON | Required within parent | |
discountAmount (anyOf 1) | number | Alternative | Discount amount of the usage line item. |
discountAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discountQuantity | JSON | Required within parent | |
discountQuantity (anyOf 1) | number | Alternative | Discount quantity of the usage line item. |
discountQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
grossAmount | JSON | Required within parent | |
grossAmount (anyOf 1) | number | Alternative | Gross amount of the usage line item. |
grossAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
grossQuantity | JSON | Required within parent | |
grossQuantity (anyOf 1) | number | Alternative | Gross quantity of the usage line item. |
grossQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
netAmount | JSON | Required within parent | |
netAmount (anyOf 1) | number | Alternative | Net amount of the usage line item. |
netAmount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
netQuantity | JSON | Required within parent | |
netQuantity (anyOf 1) | number | Alternative | Net quantity of the usage line item. |
netQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pricePerUnit | JSON | Required within parent | |
pricePerUnit (anyOf 1) | number | Alternative | Price per unit of the usage line item. |
pricePerUnit (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
product | string | Required within parent | Product name. |
sku | string | Required within parent | SKU name. |
unitType | string | Required within parent | Unit type of the usage line item. |
Get billing usage summary for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
organization | string | Required within parent | The unique identifier of the organization. |
product | string | Optional | The product for the usage report. |
repository | string | Optional | The name of the repository for the usage report. |
sku | string | Optional | The SKU for the usage report. |
timePeriod | Model | Required within parent | Expand Get billing usage summary for a user — response body — time Period |
usageItems | array | Required within parent | |
usageItems[] | Model | Each item | Expand Get billing usage summary for a user — response body — usage Items item |
Referenced models: Get billing usage summary for a user — response body — time Period, Get billing usage summary for a user — response body — usage Items item
Update a budget for an organization — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
budget | object | Required within parent | |
budget.budget_alerting | object | Optional | |
budget.budget_alerting.alert_recipients | array | Optional | Array of user login names who will receive alerts. Ignored for user-scope as alerting is always disabled for them. |
budget.budget_alerting.alert_recipients[] | string | Each item | |
budget.budget_alerting.will_alert | boolean | Optional | Whether alerts are enabled for this budget. Ignored for user-scope as alerting is always disabled for them. |
budget.budget_amount | JSON | Optional | |
budget.budget_amount (anyOf 1) | integer | Alternative | The budget amount in whole dollars. For license-based products, this represents the number of licenses. Minimum: 0 |
budget.budget_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
budget.budget_entity_name | string | Optional | The name of the entity to apply the budget to |
budget.budget_product_sku | string | Optional | A single product or sku to apply the budget to. |
budget.budget_scope | string | Optional | The type of scope for the budget Known values: enterprise, organization, repository, cost_center, multi_user_customer, multi_user_cost_center, user |
budget.budget_type | JSON | Optional | The type of pricing for the budget |
budget.budget_type (anyOf 1) | string | Alternative | Known values: ProductPricing |
budget.budget_type (anyOf 2) | string | Alternative | Known values: SkuPricing |
budget.consumed_amount | JSON | Optional | |
budget.consumed_amount (anyOf 1) | number | Alternative | The consumed amount for the specified user within the budget. Only included for `user`-scoped budgets. |
budget.consumed_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
budget.expires_at | string | Optional | 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` Format: date |
budget.id | string | Optional | ID of the budget. |
budget.prevent_further_usage | boolean | Optional | Whether to prevent additional spending once the budget is exceeded |
budget.user | string | Optional | The user login when the budget is scoped to a single user (`user` scope). |
message | string | Required within parent | A message indicating the result of the update operation |