API reference
REST API: authentication, errors and rate limits
Send goals, payments and crawler hits from your server with a website API key: the base URL, authentication, endpoints, error codes and rate limits.
The REST API is for your server: send goals, payments and crawler hits. Base URL:
https://supranalytics.app/api/v1
Authentication
Use a website API key, from the website's Settings → API. Keys start with pk_, belong to one website, and can be named, rolled and deleted (up to 20). Send it as a bearer token:
Authorization: Bearer pk_YOUR_KEY Content-Type: application/json
Keep keys on your server. The API has no CORS, on purpose: it's not meant to be called from browsers.
Endpoints
| Endpoint | What it does |
|---|---|
POST /api/v1/goals | Record a goal for a visitor. |
POST /api/v1/payments | Record a payment, a renewal or a refund. |
POST /api/v1/crawl | Record crawler hits. |
Errors
| Status | Meaning |
|---|---|
400 | A field is missing or invalid. The body says which: { "error": "…" } |
401 | Missing or wrong API key: { "error": "Invalid API key" } |
404 | Not found (for goals: the visitor has no visits yet). |
429 | Too many requests. Wait the number of seconds in the Retry-After header. |
Rate limits
3,000 requests a minute per key.
Reading your data
To read reports from code, use the read API with an account API key. From a terminal, use the CLI. For an AI assistant, use the MCP server.
AI agent or LLM? Read this page as Markdown