API reference/20 of 22

Analytics

Scan totals, series, and device/country breakdowns.

GET/api/v1/workspaces/:workspaceId/analytics/codes/:codeId

Aggregate scan metrics for a dynamic code: range, totals, daily series, device_breakdown, country_breakdown.

Requires analytics on the plan (Pro+) and analytics scope for API keys. Also: …/compare and …/codes/:codeId/csv.

Auth: User JWT, or Business API key · Scope: analytics

curl -s "https://api.getmaxqr.com/api/v1/workspaces/$WS/analytics/codes/$CODE" \
  -H "X-Api-Key: mq_live_…"
Response
{
  "range": { "from": "2026-10-01", "to": "2026-11-04" },
  "totals": { "scans": 1284, "unique_visitors": 900, "bot_scans": 12 },
  "series": [{ "day": "2026-11-01", "scans": 40, "unique_visitors": 32, "bot_scans": 0 }],
  "device_breakdown": { "mobile": 900, "desktop": 384 },
  "country_breakdown": { "US": 500, "DE": 200 },
  "notes": ["unique_visitors is an estimate based on a daily privacy hash (not people)."]
}