API Reference
Authentication & overview
Query your Otus analytics data programmatically with the read-only Stats API.
The Otus Stats API lets you query your analytics data programmatically — for custom dashboards, scheduled exports or feeding data into other tools. It is read-only.
Base URL
https://app.otusanalytics.com/api/v1
Authentication
All requests are authenticated with an API key passed as a bearer token:
curl https://app.otusanalytics.com/api/v1/sites \
-H "Authorization: Bearer sk_live_xxx"
Create keys under Account → API keys. A key can only read sites its owner is a member of. The following are not available via the API: billing, authentication, member management, key management and any mutations (sending events or changing settings).
To send events, use the client-side tracking API in the browser — the Stats API is for reading data only.
Conventions
- All endpoints are GET.
- Site-scoped endpoints take a numeric site ID:
/sites/{id}/…. - Date range parameters generally default to the trailing 30 days when omitted.
- Responses are JSON.
Endpoints
| Endpoint | Description |
|---|---|
GET /sites | List sites you can access. |
GET /sites/{id}/analytics/overview | Overview metrics. |
GET /sites/{id}/analytics/breakdown-timeseries | Metric × dimension over time. |
GET /sites/{id}/analytics/engagement | Engagement metrics. |
GET /sites/{id}/analytics/realtime | Realtime snapshot. |
GET /sites/{id}/analytics/funnel | Funnel computation. |
GET /sites/{id}/events | Registered events. |
GET /sites/{id}/conversions | Conversions. |
GET /sites/{id}/ecommerce | E-commerce metrics. |
Errors
Standard HTTP status codes are used — 200 for success, 401 for a missing or invalid key, 403 when the key can't access the requested site, and 404 for unknown resources.