PilotFoxDocs

Export raw events

GET
/api/v1/sites/{siteId}/export

The site's raw events in the window (format=jsonl is required), one JSON object per line (application/x-ndjson, sent as an attachment), in the format a native_jsonl import reads: every event column except site_id and import_id. Events only: identity aliases (manual identify) and session replay data are not exported. Rows come in no particular order. Needs exports:read and sessions:read (rows carry visitor ids, user ids and coordinates). The window is required (all=true is refused) and at most 400 days. A failure after the first bytes breaks the transfer instead of ending the body (no trailer); every complete line before it is a valid row. The body carries no completion marker, so a client must treat any transport error (a reset, a truncated chunked body, a proxy closing early) as an incomplete export. A client that stops reading is cut off within about a minute, and an export ends after about 10 minutes whatever its progress. A few exports run at once per server (two by default), one more answering 503, and fewer per organization (one by default), one more answering 429.

Requires exports:read on the site (an API key, or a signed-in member's role). Share links: 401.

Authorization

headerx-api-key<token>

An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).

Scope: exports:read

Path Parameters

siteId*string

Query Parameters

start?string
end?string
last?string
all?"true"
Value in"true"
tz?string
bucket?string
Value in"minute""5m""15m""hour""day""week""month""year"
compare?string
Value in"previous""year"
compare_start?string
compare_end?string
format*"jsonl"
Value in"jsonl"

Response Body

One event per line

response?stringapplication/x-ndjson
Example Request
curl -X GET 'https://pilotfox.app/api/v1/sites/string/export?format=jsonl'
Example Response200
"string"