Skip to main content
GET
/
v1
/
meters
/
{id}
TypeScript SDK
import { Solifyn } from 'solifyn';

const solifyn = new Solifyn({ apiKey: 'your_private_api_key_here' });

// Retrieve usage meter
const meter = await solifyn.meters.get('meter_019e56a1...');
console.log('Meter Details:', meter);
{
  "id": "mtr_8Z1aB2cD3eF4gH5iJ6kL7m",
  "businessId": "biz_4r5t6y7u8i9o",
  "name": "API Request Count",
  "eventName": "api.request",
  "aggregationType": "COUNT",
  "archived": false,
  "createdAt": "2026-05-23T10:00:00.000Z",
  "updatedAt": "2026-05-23T10:00:00.000Z",
  "usageEvents": [
    {
      "id": "evt_9Y3kP4qR7tU1vW2xZ5aB6c",
      "meterId": "mtr_8Z1aB2cD3eF4gH5iJ6kL7m",
      "customerId": "cus_8n7m6l5k4j3h2g1f0e9d8c",
      "value": 1,
      "timestamp": "2026-05-23T10:00:00.000Z",
      "processedAt": "2026-05-23T10:00:01.000Z",
      "metadata": {
        "plan": "enterprise",
        "region": "asia-southeast-1"
      }
    }
  ],
  "totalUsageEvents": 1284,
  "description": "Counts successful API requests for usage-based billing.",
  "aggregationKey": "tokens",
  "unit": "requests",
  "filters": {
    "event_type": "premium",
    "region": "asia"
  }
}

Authorizations

Authorization
string
header
required

Authenticate requests using your standard bearer API key (e.g. YOUR_API_KEY).

Path Parameters

id
string
required

The unique meter ID.

Example:

"mtr_8Z1aB2cD3eF4gH5iJ6kL7m"

Query Parameters

start_date
string
required
end_date
string
required

Response

200 - application/json

Meter retrieved successfully.

Represents a usage meter with its most recent usage events and total usage event count.

id
string
required

The unique meter ID.

Example:

"mtr_8Z1aB2cD3eF4gH5iJ6kL7m"

businessId
string
required

The business ID that owns this meter.

Example:

"biz_4r5t6y7u8i9o"

name
string
required

Meter display name.

Example:

"API Request Count"

eventName
string
required

The event name tracked by this meter.

Example:

"api.request"

aggregationType
enum<string>
required

Aggregation strategy for usage events.

Available options:
COUNT,
SUM,
MAX,
LAST
Example:

"COUNT"

archived
boolean
required

Whether the meter is archived.

Example:

false

createdAt
string<date-time>
required

Creation timestamp.

Example:

"2026-05-23T10:00:00.000Z"

updatedAt
string<date-time>
required

Last update timestamp.

Example:

"2026-05-23T10:00:00.000Z"

usageEvents
object[]
required

Most recent usage events recorded for the meter.

totalUsageEvents
number
required

Total usage event count for the meter.

Example:

1284

description
object

Meter description.

Example:

"Counts successful API requests for usage-based billing."

aggregationKey
object

Metadata key used for aggregation.

Example:

"tokens"

unit
object

Measurement unit label.

Example:

"requests"

filters
object

Optional filter definition for advanced matching.

Example:
{ "event_type": "premium", "region": "asia" }