LAGO_URL="https://api.getlago.com" API_KEY="__YOUR_API_KEY__" curl --location --request DELETE "$LAGO_URL/api/v1/billable_metrics/:code" \ --header "Authorization: Bearer $API_KEY"
{ "billable_metric": { "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "name": "Storage", "code": "storage", "recurring": false, "created_at": "2022-09-14T16:35:31Z", "aggregation_type": "sum_agg", "description": "GB of storage used in my application", "rounding_function": "round", "rounding_precision": 2, "expression": "round((ended_at - started_at) * units)", "field_name": "gb", "weighted_interval": "seconds", "filters": [ { "key": "region", "values": [ "us-east-1" ] } ] } }
This endpoint deletes an existing billable metric representing a pricing component of your application.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Code of the existing billable metric.
"storage"
Billable metric deleted
Show child attributes