Docs
← Back to site

The HTTP API

1 min readUpdated November 11, 2026

Everything the SDK does is plain HTTP under https://<wordpress>/wp-json/nahnu-analytics/v1/api, with Authorization: Bearer nak_…, so any language works. Without pretty permalinks, use https://<wordpress>/?rest_route=/nahnu-analytics/v1/api….

openapi.json in the package describes every route (OpenAPI 3.1): import it into Postman or Insomnia, or generate a client from it.

MethodPathBody → answer
GET/platformTracking addresses, portal
GET/platform/proxy · /platform/proxy/{site_key}Signing secrets (404 for a key no site has)
GET/platform/clientsAll clients
PUT · GET · DELETE/platform/clients/{ref}{name, kind?} · client, sites, users
GET · POST · DELETE/platform/clients/{ref}/users{email, name?, role?, invite?} · ?email=
POST/platform/clients/{ref}/login{email, to?: "sites/{site ref}"} → {url, signs_in}
PUT · GET · DELETE/platform/sites/{ref}{name, domains, client, timezone?, currency?, adopt?, goals?}
GET/platform/sites/{ref}/status{receiving, visitors_24h, pageviews_24h, live}
POST · DELETE/platform/sites/{ref}/embed{password?} → {url, iframe}
GET · PUT/platform/sites/{ref}/links{sites: [site refs]} → {links}
GET/platform/sites/{ref}/cross?period=30d
GET/platform/usage?period=month or custom&from=&to=
GET · POST/platform/read · /platform/read/rotateThe read secret and address; a new secret
POST<read address> (Cloudflare){t: token, op, site, period, …} as text/plain
POST/events/{site id or domain}{name, id?, props?, revenue?, url?, ip?, user_agent?} or {events: […50]}
GET/stats/{site id} · /stats/{id}/report · /realtime/{id}Stats
Example: make a client
curl -X PUT https://stats.example.com/wp-json/nahnu-analytics/v1/api/platform/clients/user_42 \
  -H "Authorization: Bearer $NAHNU_ANALYTICS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example Co"}'

Was this helpful?