v8
OpenAPI 3.1.02026-08-033623795.0 MBStats
Metric stats
Query an aggregated metric. Returns data grouped by period with optional breakdowns.
Required permissions:
- stats:read
get/stats/metric
Query parameters
resourcestring required
Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:new_users').
granularitystring nullable
Time granularity (daily, weekly, monthly).
breakdownsstring[] nullable
Columns to break down the metric by.
filtersobject nullable
Key-value pairs to filter the data.
time_zonestring nullable
IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. Only applies to ClickHouse metrics.
fromstring date-time nullable
Start of time range (unix timestamp).
Example:2023-12-01T05:00:00.401Z
tostring date-time nullable
End of time range (unix timestamp).
Example:2023-12-01T05:00:00.401Z
company_idstring nullable
Scope query to a specific company.
Example:biz_xxxxxxxxxxxxxx
user_idstring nullable
Scope query to a specific user.
Example:user_xxxxxxxxxxxxx
Response
A successful response