Docs menu

REST API

Read stats and revenue, and create goals, alerts and payments, with one key.

Updated 21 Oct 2026

Authentication

Create a key under Settings → API keys and MCP. We show it once; store it as a secret. Send it on every request:

Header
Authorization: Bearer atr_live_…
ReadAll GET endpoints.
Read and writeAlso POST goals, alerts and payments.

A key sees every site in its workspace and nothing else. Owners and admins can create and revoke keys; revoking works right away. API calls are free and never count toward pageviews.

Requests

Base URL https://app.atrby.site/api/v1. Most endpoints take:

NameTypeRequiredDescription
sitestringRequiredSite domain (acme.io) or id (st_…).
rangestringOptionaltoday, 24h, 7d, 30d or 90d. Default 30d.
curl
curl "https://app.atrby.site/api/v1/revenue?site=acme.io&range=30d" \
  -H "Authorization: Bearer $ATRBY_API_KEY"

Endpoints

GET /sitessites: id, domain, name, timezone, verified_at.
GET /statskpis and previous (visitors, sessions, pageviews, revenue, payments, bounceRate, conversionRate), series, and breakdowns by page, entry_page, channel, referrer, utm_campaign, country, device, browser and ai, top 10 each.
GET /revenuekpis (revenue, gross, payments, refunds, attributed, newCustomers, avgOrder), previous, sources (channel, source, customers, revenue) and series.
GET /vitalsmetrics (p75 and good/poor share), byDevice, pages (top 20) and trend.
GET /funnelsteps and byChannel. Optional steps parameter: a JSON array of 2 to 8 {kind, match}, kind one of any, page, event, revenue. Default: any page, /pricing, paid.
POST /goals{site, name, kind: "page" | "event", match}. Page matches start with / and may end in *.
POST /alerts{site, kind, threshold_pct?, recipient}. kind: revenue_drop, traffic_spike or tracking_stopped; threshold 10 to 500, default 30; recipient must be a workspace member.
POST /paymentsThe Payment API.

Errors and limits

400Invalid body or parameters. The response has error and, for bodies, issues.
401Missing, malformed or revoked key.
403A read key used on a write endpoint.
404Unknown endpoint, or a site that isn't in this key's workspace.
429Over 120 requests a minute for this key. Wait for Retry-After seconds.
OpenAPI
The full spec is openapi/atrby.openapi.yaml in the atrby repository.
Was this helpful?
Ask a question about this page