Billable metrics
Delete a billable metric
This endpoint deletes an existing billable metric representing a pricing component of your application.
DELETE
/
billable_metrics
/
{code}
Authorization
Path
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",
"description": "GB of storage used in my application",
"recurring": true,
"created_at": "2022-09-14T16:35:31Z",
"field_name": "gb",
"aggregation_type": "sum_agg",
"weighted_interval": "seconds",
"group": {
"key": "region",
"values": [
"us-east-1",
"us-east-2",
"eu-west-1"
]
},
"active_subscriptions_count": 4,
"draft_invoices_count": 10,
"plans_count": 4
}
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
code
string
requiredCode of the existing billable metric.
Response
200 - application/json
billable_metric
object
requiredWas this page helpful?
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",
"description": "GB of storage used in my application",
"recurring": true,
"created_at": "2022-09-14T16:35:31Z",
"field_name": "gb",
"aggregation_type": "sum_agg",
"weighted_interval": "seconds",
"group": {
"key": "region",
"values": [
"us-east-1",
"us-east-2",
"eu-west-1"
]
},
"active_subscriptions_count": 4,
"draft_invoices_count": 10,
"plans_count": 4
}
}