HTTP API

Public

POST /api/event

Browser ingest. 202 on success. 404 if the domain is not a registered site.

Called by v5.js via sendBeacon or fetch + keepalive. CORS is open. Body is capped at 64 KB.

Body

EventIn
{
  "d": "example.com",
  "n": "pageview",
  "u": "https://example.com/docs/middleware",
  "r": "https://chatgpt.com/",
  "h": "example.com",
  "w": 1440,
  "p": { "plan": "pro" },
  "utm_source": "chatgpt",
  "utm_medium": "ai_search",
  "utm_campaign": "",
  "utm_term": "",
  "utm_content": ""
}

d can also be supplied as ?d=. The server uses X-Forwarded-For / X-Real-IP for hash + geo, then discards the IP. UA comes from the request header. jsExecuted is true.

Response

StatusMeaning
202Accepted
400Bad JSON
404Unknown site

Something off? Open an issue · Edit on GitHub