Skip to main content
New to Corsair? See API access, authentication, and error handling.

Export

datapoints

export.datapoints Export raw page views and events for a date range as JSON datapoints, unsampled, with the fields you name Risk: read
Input Export asks for format=json, because the CSV, NDJSON, Parquet and Avro formats cannot be returned intact. Metadata columns appear only when named in metadata_fields, and need their storage suffix; a bare key such as project_text is sent as metadata.project_text. Output

Stats

get

stats.get Read aggregated stats for one website: page views, visitors, top pages, countries, referrers, UTM values, browsers, operating systems, devices, time on page and event counts Risk: read
Input Send at least one field; an empty list returns the version 1 format. The path form reads one page, so pass path rather than the page filter for that; a path of / (the homepage) is sent as the page filter. Metadata filters use the bare key as metadata.<key>, without a storage suffix, and every filter given has to match. Output

Websites

add

websites.add Add a website to the default team, optionally public, with a timezone and a label; needs the owner, admin or developer role and the user id Risk: write
Input Needs the owner, admin or developer role, and the team must not have reached its plan website limit. An unrecognised timezone falls back to UTC. Output

list

websites.list List every website on the account with its timezone, visibility, whether the script is installed, and its 30-day page view and event estimates; needs the user id Risk: read
Input: empty object Needs the user id as well as the API key. The response always covers every website on the account; the team has no effect on this route. Output