Skip to main content
POST
Create new billable metric

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-admin-api-key
string
required

The API key to access the admin API

Body

application/json
name
string
required
Example:

"Storage"

code
string
required
Example:

"storage"

description
string
required
Example:

"storage billable metric"

recurring
boolean
required
Example:

false

aggregatorType
enum<string>
required

Billing Aggregator

Available options:
count_agg,
sum_agg,
max_agg,
unique_count_agg,
weighted_sum_agg,
latest_agg
Example:

"sum_agg"

fieldName
string
required

aggregating usage data

Example:

"gb"

Response

Creates a new Billable Metric

name
string
required
Example:

"Storage"

code
string
required
Example:

"storage"

description
string
required
Example:

"storage billable metric"

recurring
boolean
required
Example:

false

aggregatorType
enum<string>
required

Billing Aggregator

Available options:
count_agg,
sum_agg,
max_agg,
unique_count_agg,
weighted_sum_agg,
latest_agg
Example:

"sum_agg"

fieldName
string
required

aggregating usage data

Example:

"gb"