Skip to main content
The TinyTrack REST API gives you programmatic access to your analytics data — list your tracked sites, pull aggregated pageview and visitor stats, and send custom events from your own backend. The API is available exclusively on the Pro plan and communicates exclusively over HTTPS, returning JSON for every request and response. Base URL
All endpoints described in this documentation are relative to this base URL.

Authentication

Every request to the TinyTrack API must include your API key in the Authorization header as a Bearer token:
Generate your API key from Settings → API in your TinyTrack dashboard. For full details on generating, using, and rotating keys, see the Authentication page.

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:
Query-parameter-based requests (such as GET /v1/stats) do not require a request body.

Response Format

All successful responses return a JSON object with a data key containing the requested resource and an optional meta key with pagination details:
List endpoints paginate results using 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 HTTP 429 Too Many Requests. Check the Retry-After header in the response to learn how many seconds to wait before retrying:
Implement exponential back-off in your integration to handle bursts gracefully and avoid hammering the limit.

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.