DEVELOPERS

API for scripts
and agents.

Let a script or an AI agent add websites to your workspace for you. A plain-text version for agents is at /llms.txt.

Create a website

curl -X POST https://webanalytics.sh/api/sites \
  -H "Authorization: Bearer $WEBANALYTICS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Tandlæge Hillerød","origins":["tandlægehillerød.dk"]}'

The response contains the new website and the snippet to place in its pages:

{
  "site": { "id": "3f2c…", "name": "Tandlæge Hillerød", "origins": ["https://xn--tandlgehillerd-4ib01a.dk"], … },
  "snippet": "<script defer src=\"/_analytics/script.js\" data-site=\"3f2c…\"></script>"
}

Endpoints

Rules