Skip to content
Quantalog
All docs

Platform API

Embed analytics into your own product — projects, sites, and the integration flow.

The Platform API lets you offer analytics to your users inside your product. Your users never sign up with Quantalog and never see our UI — your backend creates the sites, injects the tracker, reads the numbers, and renders them in your own design.

The model

  • Workspace — your organisation. Holds the API key. All data is scoped to it.
  • Project — one app belonging to one of your end-users. Tag it with your own extUserId.
  • Site — a tracked property inside a project. Has a public siteId.

Integration flow

1. Create a project when a user creates an app on your platform:

POST /v1/projects
curl -X POST https://quantalog-be.daorbit.in/v1/projects \
  -H "Authorization: Bearer $QUANTALOG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Jane Portfolio", "extUserId": "user_123" }'

2. Create a site inside that project — the snippet comes back:

POST /v1/projects/:pid/sites
curl -X POST https://quantalog-be.daorbit.in/v1/projects/PROJECT_ID/sites \
  -H "Authorization: Bearer $QUANTALOG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Production", "domain": "jane.app", "framework": "react" }'

# -> { "site": { "siteId": "..." }, "snippet": "<script ...></script>" }

3. Inject the returned snippet into the generated app's <head>.

4. Read the stats from your backend and render them in your own UI:

GET /v1/sites/:siteId/stats
curl "https://quantalog-be.daorbit.in/v1/sites/SITE_ID/stats?range=24h" \
  -H "Authorization: Bearer $QUANTALOG_API_KEY"

Full reference

See the API reference for authentication, every endpoint, and response codes.