Authentication
Every request to the TinyTrack API must include your API key in theAuthorization header as a Bearer token:
Request Format
The API accepts requests over HTTPS only — plain HTTP requests are rejected. When a request requires a body (for example,POST /v1/events), send it as JSON and include the Content-Type: application/json header:
GET /v1/stats) do not require a request body.
Response Format
All successful responses return a JSON object with adata key containing the requested resource and an optional meta key with pagination details:
page and per_page in meta. Date ranges, totals, and other resource-specific metadata appear alongside page inside meta where relevant.
Error Responses
When a request fails, the API returns a JSON error object alongside the appropriate HTTP status code. Every error object includes three fields:
Common status codes you will encounter:
Rate Limiting
Requests are rate-limited per API key. When you exceed the limit, the API responds with HTTP429 Too Many Requests. Check the Retry-After header in the response to learn how many seconds to wait before retrying:
Available Endpoints
Sites
List all websites registered in your account and retrieve individual site details.
Stats
Query aggregated pageviews, unique visitors, and top pages for any site and date range.
Events
Ingest custom events server-side without loading the browser script.
Authentication
Generate and manage API keys, and learn how to authenticate every request.
The API is available on the Pro plan. Upgrade at tinytrack.io/settings/billing.