Batch, Export, and Embed Analytics
Endpoints
POST /api/analytics/batchGET /api/analytics/exportGET /api/analytics/audit-logGET /api/analytics/workspace/usageGET /api/analytics/embed
Batch requests
POST /api/analytics/batch accepts up to 10 sub-requests.
Supported sub-request types:
overviewtimeseriescity_breakdownqr_analyticsqr_geo_breakdownqr_timeseries
Export endpoint
GET /api/analytics/export
Query params:
format:csvorjsontype:timeseries,composite,funnel,utm_breakdown(plus default click-stats fallback)- optional:
days,start,end,granularity,linkId,campaignId,dimension
Audit log endpoint
GET /api/analytics/audit-log
- requires
workspace:update - optional filters:
action,actorId,resourceType, date range,limit
Workspace usage endpoint
GET /api/analytics/workspace/usage
Returns usage counters used for billing cross-checks (clicks, leads, sales) over selected range.
Embed endpoint
GET /api/analytics/embed
Query params:
node:embed_stats,embed_timeseries,embed_top_referrerswidgetType(optional)- date range and optional
limit
Permissions
analytics:readfor batch/export/usage/embedworkspace:updatefor audit-log
Common errors
400: invalid batch payload or unsupported request type500: analytics not configured or backend failure

