Analytics
Both endpoints require the analytics scope. The numbers are identical to
the console’s — same rollups, same bot filtering — because both doors call
the same implementation.
Tenant-wide analytics
Section titled “Tenant-wide analytics”GET /v1/analytics?from=&to=
from/to accept ISO 8601 timestamps (default: the last 7 days). Windows
longer than 2 days aggregate daily; shorter windows hourly.
curl "https://api.neon.xengo.io/v1/analytics?from=2026-07-05T00:00:00Z" \ -H "Authorization: Bearer $XENGO_API_KEY"{ "series": [ { "t": "2026-07-11", "count": 412 }, { "t": "2026-07-12", "count": 388 } ], "totals": { "events": 800, "human": 743, "bot": 57 }, "breakdown": { "source": { "link": 512, "qr": 288 }, "device": { "mobile": 590, "desktop": 210 }, "country": { "GB": 640, "IE": 88, "DE": 72 }, "referrer": { "(direct)": 700, "linkedin.com": 100 } }, "topLinks": [ { "code": "spring24", "count": 231 } ]}Per-link analytics
Section titled “Per-link analytics”GET /v1/links/{code}/analytics?window=24h|7d|30d
curl "https://api.neon.xengo.io/v1/links/spring24/analytics?window=7d" \ -H "Authorization: Bearer $XENGO_API_KEY"{ "code": "spring24", "window": "7d", "total": 231, "points": [ { "hour": "2026-07-12T11:00Z", "count": 87 } ]}Retention semantics
Section titled “Retention semantics”Raw rows expire after 90 days; aggregate rollups are kept indefinitely. Long-window breakdowns are computed from a capped raw sample; series totals are exact from rollups. (Same rules as the console analytics.)
