Base URL
/api/v1.
Authentication
The API uses two authentication methods depending on the endpoint:Session auth (dashboard)
Used by the dashboard and any integration that manages teams, sites, and analytics. Authenticates via session cookies set by the/api/auth/* endpoints (powered by BetterAuth).
All team-scoped endpoints (/api/v1/teams/:teamSlug/...) require session auth plus team membership.
API key auth (SDK ingestion)
Used by the SDK to send events. Pass the API key as a header:Common patterns
Team-scoped routes
Most endpoints are scoped to a team via the URL:Error responses
Errors return JSON with amessage field:
| Code | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing or invalid auth |
403 | Forbidden — insufficient permissions |
404 | Not found |
500 | Server error |
Analytics time ranges
Analytics endpoints accept arange query parameter — the number of hours to include (default: 24):