Get analytics metrics
Returns key performance metrics (sessions, occupancy, dwell time) with change percentages compared to the previous period.
Authentication
AuthorizationBearer
Organization API key from your settings page
Query parameters
siteId
UUID of the site to query analytics for
period
Predefined time period (ignored when startDate/endDate provided)
Allowed values:
startDate
Custom range start (ISO 8601). Must be paired with endDate.
endDate
Custom range end (ISO 8601). Must be paired with startDate.
Response
Successful response
status
Allowed values:
data
Metrics data structure returned by /api/analytics/metrics Used by StatsCardsWrapper for client-side fetching
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error