DocsUnderstand
Stats API
Read your numbers and insights from scripts, spreadsheets and AI agents.
The API is read-only. It answers with the same numbers as your dashboard and the same findings as the Insights page, as JSON.
Make a key
- Open your account and choose New under API keys.
- Name it after where you’ll use it. Enter your password, and a code from your app if two-step sign-in is on.
- Copy the key. It is shown only once; Dominion keeps only a one-way hash of it.
A key acts as you. It sees the sites you can see, and revenue only where you can see revenue. If you leave a business or lose access to a site, the key loses it at the same moment. A key works until you revoke it from your account: changing your password or signing out everywhere doesn’t stop it. You can hold 10 keys at once.
Send the key
Send it in the Authorization header of every request. A key in the address is refused, because addresses are written to logs.
curl -H "Authorization: Bearer dk_YOUR_KEY" https://dominion.page/api/v1/sitesEndpoints
| Request | Answers with |
|---|---|
GET /api/v1/sites | Every site you can see: id, name, domain, timezone, currency, business, your role, and whether you see revenue. |
GET /api/v1/sites/{site}/stats | The dashboard: totals, the previous period, the chart series, every breakdown and your goals. |
GET /api/v1/sites/{site}/insights | What changed, ranked, in plain sentences. |
curl -H "Authorization: Bearer dk_YOUR_KEY" "https://dominion.page/api/v1/sites/YOUR-SITE-ID/stats?range=7d&channel=ai"Ranges and filters
The stats endpoint takes the same query as the dashboard’s address, so you can copy it from there.
range:today,yesterday,7d,28d,30d,90d,6mo,12mo,mtd,lastmonth,ytd, or two days like2026-11-01~2026-11-30. Days are in the site’s timezone.compare:previous(the default),yearoroff.- Filters:
channel,source,page,country,device,utm_campaignand the rest of the dashboard’s filters.
Insights take range as 7d, 28d or 90d (whole days; the default is 7d).
For AI agents
Each insight has a title (the finding in one sentence), a body (what it means), the numbers behind it, sig (true only when a change is statistically real), confidence (a short label such as “z = 3.1” or “Could be noise”) and an action with an href: where to look next on the dashboard, as a path on this site. An assistant can read them as they are and pass them on. Give an agent its own key, so you can revoke it alone.
Limits and errors
- Each key may make 600 requests an hour. Past that the answer is
429with aRetry-Afterheader in seconds. - All your keys together may have the database read 7,500,000 rows an hour. A request repeated within a minute is answered from a cache and reads nothing; a filter over a long range of a busy site reads the most. Past that the answer is
429too. 401bad_key: the key is missing, wrong or revoked.404: no such site, or one this key can’t see.503busy: a lot is happening at once. Wait the seconds inRetry-Afterand try again.- Only
GETis accepted. Browsers can’t call the API from other sites: call it from a server or a script.