Skip to content

Get billing usage report for an organization

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

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

Note: This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see “About the enhanced billing platform.”

API method documentation

org
required
string

The organization name. The name is not case sensitive.

year
integer

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.

month
integer

If specified, only return results for a single month. The value of month is an integer between 1 and 12. If no year is specified the default year is used.

day
integer

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.

Billing usage report response for an organization

Media type application/json
object
usageItems
Array<object>
object
date
required

Date of the usage line item.

string
product
required

Product name.

string
sku
required

SKU name.

string
quantity
required

Quantity of the usage line item.

integer
unitType
required

Unit type of the usage line item.

string
pricePerUnit
required

Price per unit of the usage line item.

number
grossAmount
required

Gross amount of the usage line item.

number
discountAmount
required

Discount amount of the usage line item.

number
netAmount
required

Net amount of the usage line item.

number
organizationName
required

Name of the organization.

string
repositoryName

Name of the repository.

string
Examples
Example default
{
"usageItems": [
{
"date": "2023-08-01",
"product": "Actions",
"sku": "Actions Linux",
"quantity": 100,
"unitType": "minutes",
"pricePerUnit": 0.008,
"grossAmount": 0.8,
"discountAmount": 0,
"netAmount": 0.8,
"organizationName": "GitHub",
"repositoryName": "github/example"
}
]
}

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Internal Error

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Service unavailable

Media type application/json
object
code
string
message
string
documentation_url
string
Example generated
{
"code": "example",
"message": "example",
"documentation_url": "example"
}