API Reference
Custom Metrics
List and push data to custom metric groups. Uses the secret key for authentication.
List Metric Groups
GET
/api/v1/metrics
Secret Key
Returns all metric groups and their metrics for the account.
Response
{
"groups": [
{
"slug": "revenue",
"name": "Revenue",
"metrics": [
{
"code": "mrr",
"name": "Monthly Recurring Revenue",
"aggregation": "last"
}
]
}
]
}
Push Data Points
POST
/api/v1/metrics
Secret Key
Creates or updates data points for metrics in a group. Existing data points for the same date are updated.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| group | string | Yes | Metric group slug (from the list endpoint) |
| data | array | Yes | Array of data point objects (max 100 per request) |
Data Point Object
| Field | Type | Required | Description |
|---|---|---|---|
| metric | string | Yes | Metric code |
| date | string | Yes | Date in YYYY-MM-DD format |
| value | number | Yes | Numeric value |
Example Request
{
"group": "revenue",
"data": [
{ "metric": "mrr", "date": "2025-01-15", "value": 12500 },
{ "metric": "mrr", "date": "2025-01-16", "value": 12750 }
]
}
Success Response
{
"status": "ok"
}
Partial Error Response
{
"status": "ok",
"errors": [
{ "index": 1, "message": "Metric 'xyz' not found in group" }
]
}