Meters
Create a meter
Creates a meter.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
Meter payload
name*string
Name of the meter.
event_name*string
The name of the event to track usage for.
description?string
Internal description of the meter.
account_mapping*
Defines the connection between event data and Billingrails accounts.
profiles*
Meter profiles define aggregation behaviors for a meter.
Items
1 <= itemsResponse Body
application/json
curl -X POST "https://api.sandbox.billingrails.com/v1/biller/meters" \ -H "Content-Type: application/json" \ -d '{ "name": "API Requests Meter", "event_name": "API request", "description": "Tracks API request usage for accounts.", "account_mapping": { "type": "id", "event_property": "billingrails_account_id" }, "profiles": [ { "name": "Monthly API Requests", "code": "monthly_api_requests", "recurring": true, "aggregation_method": "count" } ] }'{
"meter": {
"object": "meter",
"id": "mtr_IhMUl3rrZ3",
"name": "API Requests Meter",
"event_name": "API request",
"description": "Tracks API request usage for accounts.",
"status": "active",
"created_at": "2025-02-14T17:33:40.843Z",
"account_mapping": {
"type": "id",
"event_property": "billingrails_account_id"
},
"default_profile": {
"id": "mtrpro_IhMUl3rrZ3",
"name": "Monthly API Requests",
"code": "monthly_api_requests",
"recurring": true,
"aggregation_method": "count"
},
"profiles": [
{
"id": "mtrpro_IhMUl3rrZ3",
"name": "Monthly API Requests",
"code": "monthly_api_requests",
"recurring": true,
"aggregation_method": "count"
}
]
},
"meta": {
"request_id": "req_IhMUl3rrZ3"
}
}