Billing
Get Categorized Billing
Retrieves billing information for the organization within the specified date range and filters.
In order to access this endpoint, the provided API key must have at least one of the following roles:
- Organization Owner
- Billing Admin
- Billing Viewer
To learn more, see Organization, Project, and Database Access Overview.
post/v4/organizations/{organizationId}/billing
Request
- Base URLhttps://cloudapi.cloud.couchbase.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"startDate": "2025-04-01",
"endDate": "2025-04-30",
"filters": {
"categories": [
"analyticsCompute",
"analyticsStorage"
],
"projectIds": [
"ffffffff-aaaa-1414-eeee-000000000000",
"ffffffff-aaaa-1414-eeee-000000000001"
],
"instanceIds": [
"ffffffff-aaaa-1414-eeee-000000000000",
"ffffffff-aaaa-1414-eeee-000000000001"
]
}
}Response
Successfully retrieved the categorized billing information.
Example response
{
"data": {
"periods": [
{
"startDate": "2025-04-01",
"endDate": "2025-04-30",
"categories": [
{
"category": "analyticsCompute",
"creditSpend": 90.1,
"currencySpend": 90.1,
"contributionPercent": 74
}
],
"totalCreditSpend": 3302.11,
"totalCurrencySpend": 3302.11
}
],
"total": {
"startDate": "2025-04-01",
"endDate": "2025-04-30",
"categories": [
{
"category": "analyticsCompute",
"creditSpend": 90.1,
"currencySpend": 90.1,
"contributionPercent": 74
}
],
"totalCreditSpend": 26120.18,
"totalCurrencySpend": 26120.18
},
"billingCurrency": "USD"
}
}Changes
No recorded changes to this operation across all 5 revisions of this API.