The HTTP API
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.
| Method | Path | Body → answer |
|---|---|---|
| GET | /platform | Tracking addresses, portal |
| GET | /platform/proxy · /platform/proxy/{site_key} | Signing secrets (404 for a key no site has) |
| GET | /platform/clients | All 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/rotate | The 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?
Thanks for your feedback!
✓ Feedback received. Thank you!



