API overview
Check the public API base URL, versioning and error format before building an integration.
Make one authenticated request to confirm the URL and key your integration will use.
-
Set your instance URL and API key.
Terminal window export SUPERMETRY_URL="https://analytics.example.com"export SUPERMETRY_API_KEY="replace-with-your-key" -
Request the sites visible to the key.
Terminal window curl --fail-with-body "$SUPERMETRY_URL/api/public/v1/sites" \-H "Authorization: Bearer $SUPERMETRY_API_KEY" \-H "Accept: application/json" -
Keep integration requests under
/api/public/v1. Thev1path is the API version; dashboard routes under/api/privateare unversioned and use login sessions instead. -
Handle non-success responses as RFC 9457
application/problem+json. A validation error has this shape:{"type": "https://supermetry.com/problems/bad-request","title": "Bad request","status": 400,"detail": "period is required"}401means the key is missing or invalid,403means a scope is missing,404can hide an inaccessible resource, and429includesRetry-After.
What you should see: a JSON object with a data array containing the sites the key can access.