Billable metrics
Create a billable metric
Create billable metrics programmatically with this endpoint—an essential step in configuring your pricing and packaging in Metronome.
A billable metric is a customizable query that filters and aggregates events from your event stream. These metrics are continuously tracked as usage data enters Metronome through the ingestion pipeline. The ingestion process transforms raw usage data into actionable pricing metrics, enabling accurate metering and billing for your products.
Use this endpoint to:
- Create individual or multiple billable metrics as part of a setup workflow.
- Automate the entire pricing configuration process, from metric creation to customer contract setup.
- Define metrics using either standard filtering/aggregation or a custom SQL query.
Key response fields:
- The ID of the billable metric that was created
- The created billable metric will be available to be used in Products, usage endpoints, and alerts.
Usage guidelines:
- Metrics defined using standard filtering and aggregation are Streaming billable metrics, which have been optimized for ultra low latency and high throughput workflows.
- Use SQL billable metrics if you require more flexible aggregation options.
POST
Create a billable metric
Authorizations
Body
application/json
The details of the billable metric to create.