REST API
Base URL: https://app.plaintrace.dev. The OpenAPI 3.1 schema is at
/openapi.json.
Create keys under Settings → API keys. A key is shown once and bound to one site.
| Scope | Allows |
|---|---|
read |
Stats, reports and the MCP server |
ingest |
The server SDK and server events |
write |
Changing site settings |
manage |
Owner tasks |
curl https://app.plaintrace.dev/v1/sites/<site id>/stats/overview?compare=true \ -H "Authorization: Bearer sk_live_…"Keys cannot create or revoke other keys; that needs the dashboard.
Ranges and filters
Section titled “Ranges and filters”| Parameter | Meaning |
|---|---|
from, to |
ISO 8601 with offset; [from, to); at most 400 days; default the last 30 days |
timezone |
IANA zone for days and hours; default the site’s |
include_suspicious |
true adds suspicious traffic to human |
page, source, country, device, utm_source, utm_medium, utm_campaign |
Filters |
limit |
Rows, up to 1000 |
Errors
Section titled “Errors”{ "error": { "code": "invalid_range", "message": "from must be before to", "request_id": "…" } }Validation errors carry details.issues. Every response has an X-Request-Id header.
Rate limits
Section titled “Rate limits”60 requests a minute per key. Over it you get 429 with Retry-After in seconds. A comparison
(/stats/changes) counts as ten. Dashboard sessions are not limited.
See stats endpoints.