POST /accounts/{account_id}/billable/usage
Returns cost and usage data for a single Cloudflare account, aligned with the FinOps FOCUS v1.3 Cost and Usage dataset specification.
This is the filterable counterpart to GET on the same path. It is a
read-only operation and requires only the #billing:read permission;
POST is used so that filter criteria can be supplied in a request body
rather than in the query string.
Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost.
Note: Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete.
The request body is optional. When it is omitted, or when TimePeriod
is omitted, the range defaults to the start of the current month through
today. The maximum date range is 31 days.
Filters are combined with AND. Filter values that do not match a known billable metric or product family simply match no usage, and the response is an empty result set.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id |
String | Yes |
Identifies the Cloudflare account. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
FilterBy |
Object | No |
Usage filters. Filters of different kinds are combined with AND, so a record must match every filter present to be returned. |
FilterBy.MetricIds[] |
Array | No |
Restrict results to rows whose |
FilterBy.ProductFamilyIds[] |
Array | No |
Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs. |
TimePeriod |
Object | No |
Charge period to query, i.e. when consumption happened, not when it was billed. |
TimePeriod.To |
String | No |
End of the range (ISO 8601). Required if |
TimePeriod.From |
String | No |
Start of the range (ISO 8601). Required if |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.