Create a billable metric
Defines a new billable metric. A metric specifies the event name, optional filter groups, and aggregation logic that turns raw ingested events into a quantity the billing engine can price against.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string that makes a retried write safe. If you send the same request with the same key within 24 hours, the API returns the stored response and does not run the request again. A 5xx or 429 response is not stored, so a retry with that key runs the request again.
255"ik_a1b2c3d4e5f6"
Body
How events are aggregated into a metric value
Event name that triggers this metric
"api_call"
Name of the metric
"API Calls"
Description of the metric
"Counts API calls per customer"
Filter groups to apply to events before aggregation
Tag identifiers to associate with this metric
Response
Success
How events are aggregated into a metric value
Timestamp when the metric was created
"2026-04-01T10:00:00Z"
Event name that triggers this metric
"api_call"
Unique identifier for the metric
"mtr_01H1VECT"
Name of the metric
"API Calls"
Timestamp when the metric was last updated
"2026-04-01T12:30:00Z"
Description of the metric
"Counts API calls per customer"
Filter groups applied to events before aggregation
Tag identifiers associated with this metric