Sample - GitHub REST API
GET/organizations/{org}/settings/billing/premium_request/usage

Get billing premium request usage report for an organization

Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Note: Only data from the past 24 months is accessible via this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

7 parameters
orgstringrequired
The organization name. The name is not case sensitive.
yearintegeroptional
If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year.
monthintegeroptional
If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. Default value is the current month. If no year is specified the default `year` is used.
dayintegeroptional
If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used.
userstringoptional
The user name to query usage for. The name is not case sensitive.
modelstringoptional
The model name to query usage for. The name is not case sensitive.
productstringoptional
The product name to query usage for. The name is not case sensitive.

6 status codes
200Response when getting a billing premium request usage report
timePeriodobjectrequired
organizationstringrequired
The unique identifier of the organization.
userstringoptional
The name of the user for the usage report.
productstringoptional
The product for the usage report.
modelstringoptional
The model for the usage report.
usageItemsarray<object>required
400Bad Request
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
503Service unavailable
codestringoptional
messagestringoptional
documentation_urlstringoptional

Error handling

A 400 is returned: Bad Request. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 500 is returned: Internal Error. A 503 is returned: Service unavailable.