Skip to main content

Overview

Customer meters show usage quantities for specific customers and meters. This is useful for displaying usage dashboards and understanding billing.

The Customer Meter Object

id
string
required
Unique identifier
customer_id
string
required
Customer ID
meter_id
string
required
Meter ID
quantity
number
required
Current quantity/usage
period_start
string
required
Current billing period start
period_end
string
required
Current billing period end
last_synced_at
string
required
When usage was last calculated
created_at
string
required
Creation timestamp

List Customer Meters

cURL
curl -X GET "https://api.polar.sh/v1/customer-meters" \
  -H "Authorization: Bearer polar_pat_..."

Query Parameters

organization_id
string
Filter by organization
customer_id
string
Filter by customer
external_customer_id
string
Filter by external customer ID
meter_id
string
Filter by meter

Get Customer Meter

cURL
curl -X GET "https://api.polar.sh/v1/customer-meters/{id}" \
  -H "Authorization: Bearer polar_pat_..."

Path Parameters

id
string
required
Customer meter ID

Examples

Get Customer’s Usage

curl -X GET "https://api.polar.sh/v1/customer-meters?customer_id=cust_123" \
  -H "Authorization: Bearer polar_pat_..."

Get Specific Meter Usage

curl -X GET "https://api.polar.sh/v1/customer-meters?customer_id=cust_123&meter_id=meter_api_calls" \
  -H "Authorization: Bearer polar_pat_..."
Response:
{
  "items": [
    {
      "id": "cm_123",
      "customer_id": "cust_123",
      "meter_id": "meter_api_calls",
      "quantity": 15420,
      "period_start": "2024-01-01T00:00:00Z",
      "period_end": "2024-02-01T00:00:00Z",
      "last_synced_at": "2024-01-15T12:00:00Z",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "total_count": 1,
    "page": 1,
    "page_size": 20
  }
}

Build docs developers (and LLMs) love