Skip to content

Sites

GET /api/v1/sites

Every site on the account, oldest first. Deleted sites are excluded.

Terminal window
curl -s -H "Authorization: Bearer tk_live_…" \
"https://tracing.tools/api/v1/sites"
{
"data": [
{
"id": "6f2b1e7c-9a54-4f21-8c3a-1d0b7e5f4a92",
"name": "Acme",
"domain": "acme.com",
"publicKey": "pk_live_a91c3f04",
"timezone": "Europe/Berlin",
"currency": "EUR",
"identityMode": "hash",
"createdAt": "2026-02-11T09:14:22.104Z"
},
{
"id": "b83d0a15-77c2-4e9a-bd31-6e2f0c4a8d77",
"name": "Acme Docs",
"domain": "docs.acme.com",
"publicKey": "pk_live_5c7e2b90",
"timezone": "UTC",
"currency": "USD",
"identityMode": "hash",
"createdAt": "2026-05-03T16:02:41.778Z"
}
]
}
Field Notes
id UUID. Usable in every other endpoint’s path
name The label in the site switcher
domain Bare hostname, no protocol, no www.
publicKey The key in your script tag. Also usable in every path
timezone IANA zone. Where days, weeks and months are cut
currency ISO 4217. The currency the revenue screen opens on
identityMode hash for cookieless, which is what every site created through the dashboard is
createdAt ISO 8601

No excluded IPs, excluded paths or share id are returned.

Status Body
401 {"error":"Missing or invalid API key"}

An account with no sites returns 200 and {"data":[]}.

const sites = await fetch("https://tracing.tools/api/v1/sites", {
headers: { authorization: `Bearer ${key}` },
}).then((r) => r.json());
for (const site of sites.data) {
const stats = await fetch(
`https://tracing.tools/api/v1/sites/${site.publicKey}/stats?range=7d`,
{ headers: { authorization: `Bearer ${key}` } },
).then((r) => r.json());
console.log(site.domain, stats.data.visitors);
}