Dominion

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

  1. Open your account and choose New under API keys.
  2. Name it after where you’ll use it. Enter your password, and a code from your app if two-step sign-in is on.
  3. 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.

List your sites
curl -H "Authorization: Bearer dk_YOUR_KEY" https://dominion.page/api/v1/sites

Endpoints

Stats API endpoints
RequestAnswers with
GET /api/v1/sitesEvery site you can see: id, name, domain, timezone, currency, business, your role, and whether you see revenue.
GET /api/v1/sites/{site}/statsThe dashboard: totals, the previous period, the chart series, every breakdown and your goals.
GET /api/v1/sites/{site}/insightsWhat changed, ranked, in plain sentences.
Last 7 days of AI assistant visits
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 like 2026-11-01~2026-11-30. Days are in the site’s timezone.
  • compare: previous (the default), year or off.
  • Filters: channel, source, page, country, device, utm_campaign and 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 429 with a Retry-After header 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 429 too.
  • 401 bad_key: the key is missing, wrong or revoked.
  • 404: no such site, or one this key can’t see.
  • 503 busy: a lot is happening at once. Wait the seconds in Retry-After and try again.
  • Only GET is accepted. Browsers can’t call the API from other sites: call it from a server or a script.