Skip to main content

Getting started

API

Read your TrueStat data from your own code, and configure what it measures.

Read your TrueStat data from your own code — and manage your account with it.

PageCovers
Getting an API keyIncluding the part where it is shown once
Authentication
Rate limits
Endpoint referenceEvery endpoint and every parameter
ExamplesReal requests and real responses
ErrorsEvery code, and what to do about each

On every plan

The API is on both tiers, at every traffic step — Starter included, and so is MCP. See Plans compared.

Your plan changes how many sites and people you have, and how far back your history goes. It does not change what you can read or how you read it.

What it is for

Reading your figures, and running the account around them:

  1. Put your visitor count on your own homepage, status page or internal dashboard.

  2. Chart your traffic in your own tool, with your own ranges and filters.

  3. Report which AI crawlers read your site — the thing only TrueStat can answer.

  4. Configure what you measure and who sees it — goals, funnels, alerts, notes, site settings, the shared board, the widget and your team.

What it is not for

Reading is the larger half, but the API writes too. Goals, goal rules, funnels, alerts, notes, site settings, integrations, the shared board, the widget and team membership can all be created or changed over HTTP, each behind its own write scope — see Authentication for the scope grid.

Three things stay dashboard-only, and each for a reason rather than for want of building: minting an API key (a credential that issues credentials turns one leak into permanent access), deleting a site (irreversible), and transferring ownership of an account.

Writing a pageview is also not something this API does. To send events, use the tracking script — or POST /goals for a conversion your server knows about and the browser does not.

Two things that are deliberately absent

There is no visitor endpoint. No visitor list, no per-visitor journey, no lookup by id. That is not a gap to be filled later — it needs the cross-day person identity TrueStat is built without. See What we deliberately cannot do.

There is no endpoint that posts a payment. Revenue arrives from your payment provider and is reconciled against it, so a figure you could POST would be a figure your Stripe account has never seen. What you can do is read it — revenue_cents on overview and timeseries — and manage the connection itself with the integrations endpoints, which connect, disconnect and re-sync a provider under revenue:write.

Goals are read the same way: ranked by breakdowns with dimension=goal, broken open by goal properties, and sequenced by funnels.

Was this page helpful?

Last updated September 17, 2026