Analytics API
Analytics APIs power metrics across workspace, campaign, and link views.Authentication and scope
- Requires workspace-authenticated context (session token or API key).
- Most routes require
analytics:read. GET /analytics/audit-logrequiresworkspace:update.- Route-level feature gates apply to selected endpoints (for example deep-links and device analytics surfaces).
Core endpoint groups
Workspace analytics
GET /api/analytics/workspace/overviewGET /api/analytics/workspace/timeseriesGET /api/analytics/workspace/regionsGET /api/analytics/workspace/continentsGET /api/analytics/workspace/devicesGET /api/analytics/workspace/triggersGET /api/analytics/workspace/top-foldersGET /api/analytics/workspace/top-tagsGET /api/analytics/workspace/campaigns/rankingGET /api/analytics/workspace/budgetsGET /api/analytics/workspace/usage
Link analytics
GET /api/analytics/:linkId/summaryGET /api/analytics/:linkId/timeseriesGET /api/analytics/:linkId/geoGET /api/analytics/:linkId/citiesGET /api/analytics/:linkId/regionsGET /api/analytics/:linkId/continentsGET /api/analytics/:linkId/devicesGET /api/analytics/:linkId/referrersGET /api/analytics/:linkId/triggersGET /api/analytics/:linkId/rulesGET /api/analytics/:linkId/rules/:ruleId/conditionsGET /api/analytics/:linkId/traffic-flowGET /api/analytics/:linkId/click-paths
Unified overview and conversion analytics
GET /api/analytics/overviewGET /api/analytics/conversions/detailsGET /api/analytics/leadsGET /api/analytics/leads/timeseriesGET /api/analytics/leads/breakdownGET /api/analytics/salesGET /api/analytics/sales/timeseriesGET /api/analytics/sales/breakdownGET /api/analytics/compositeGET /api/analytics/funnel
Real-time and operations
GET /api/analytics/liveGET /api/analytics/live/wsGET /api/analytics/live/statsGET /api/analytics/exportPOST /api/analytics/batchGET /api/analytics/audit-logGET /api/analytics/embed
Shared query patterns
- Date range:
days(validated and capped server-side)- or explicit
start/end
- Scope filters (supported by many routes):
campaignIdlinkId
- Time formatting:
timezonegranularity(hour,day,monthon supported endpoints)
- Currency display:
currency(supported currencies only, fallback to workspace default or USD)
Response envelope
Most analytics routes return:error.code and error.message.
Performance behavior
- Analytics GET routes are fronted by snapshot caching middleware.
- Live feeds, exports, batch queries, and deep drilldowns are intentionally uncached.
- Some endpoints fall back to D1-derived aggregates when Tinybird is unavailable.
/api-reference/analytics/timeseries/api-reference/analytics/geographic/api-reference/analytics/devices/user-guides/manual/data/analytics-views-reference/user-guides/manual/data/analytics-and-reporting

