PilotFoxDocs

API reference

Every endpoint of the PilotFox API, generated from its OpenAPI document.

These pages describe every endpoint of PilotFox, one page per operation (a method and a path), with its parameters, request body, responses and their schemas, and who may call it. They are generated from openapi.json, the OpenAPI 3.1 document the API builds from its own request and response schemas and access rules, so they match the code they were built from. Each instance serves the same document for its own version at /api/docs/openapi.json (and /api/docs/openapi.yaml), and an interactive reference at /api/docs/.

Before you start, read the guides: Authentication (API keys), Permissions (which permission each endpoint needs), Errors, Rate limits, Pagination and Query parameters (time windows, filters, segments).

How the pages are grouped

The sidebar has one section per tag of the OpenAPI document, in the document's order, and one page per operation in the section of its tag. A page is titled with the operation's summary, which the sidebar shows too, and shows its method and full path. Its address is made from the tag and the operation's operationId: GET /api/v1/sites/{siteId}/goals (listGoals, tag Goals) is at /docs/api/reference/goals/list-goals/.

A page's description ends with who may call the operation: the permission it needs, and whether share links, public sites or API keys limited to some sites are accepted. Permission per endpoint lists all of them in one place.

SectionWhat it coversOperations
SystemLiveness and readiness probes, and the instance settings the web app reads first.3
AccountThe signed-in user, their organizations, their email report subscriptions and what deleting the account would do.3
OrganizationsOrganization-wide reports and who sees which site: restricted members' and teams' site grants.5
API keysAn organization's API keys: list, create (the only answer with the key), delete.3
SitesSites, their settings, the tracking snippet, install check and first-party proxy.10
Share linksRead-only links to one site's dashboard, and what a link opens.4
AnalyticsTraffic reports of a site: overview, time series, breakdowns, pages, heatmap and web vitals, and referrer icons.10
EventsCustom and autocaptured events: names, properties, counts and the raw event list.6
ErrorsJavaScript errors the tracker captured, grouped by fingerprint.4
GeographyCountries, regions, cities and map points of visitors, and the map tiles.6
LiveWho is on the site now: counts, visitors and the server-sent event stream.4
BotsBot and AI crawler traffic that ingest set aside from the visitor reports.4
PeopleVisitors and identified users: profiles, traits, sessions and erasure.9
SessionsSessions and their event timelines.3
GoalsConversion goals, their stats and the conversions behind them.9
FunnelsSaved and ad hoc funnels, their reports and the sessions in each step.8
JourneysPaths visitors take through the site, and cohort retention.3
SegmentsSaved filters, which the analytics reports apply with segment=.5
AnnotationsNotes on a date or a date range of a site's charts, or of every site of the organization.4
ReplaysSession recordings: list, play back and delete.4
RevenueRevenue reports, subscriptions and payments, from connected providers and the payments API.11
Payment providersConnections to Stripe, Polar and Dodo Payments, whose payments feed the revenue reports.16
AffiliatesA site's affiliates, their reports, and the portal each one can open.9
Search ConsoleGoogle Search Console connections, property links and search reports.18
NotificationsNew-sale notifications and email report settings of a site.12
ImportsBring history in from other analytics tools or a PilotFox export.5
ExportsA site's raw events as NDJSON.1
IngestServer-side event ingest and identify, with API keys.2
TrackerThe browser tracker: its scripts and the endpoints it sends to (no credential).6
MCPThe Model Context Protocol server, and the OAuth discovery documents of its clients.4
AuthThe web app's sign-in and account endpoints, and the OAuth authorization server of MCP clients.4
AdminInstance administration for system administrators: statistics, organizations and sites, jobs, backups.11

Integrations work with the sections from Organizations to Ingest, with an API key holding the permissions they list. The others serve other callers:

  • System: the liveness and readiness probes and the instance's public configuration; no credential.
  • Account: the signed-in person (GET /api/v1/me), their email report subscriptions and what deleting their account would do (GET /api/v1/me/deletion); a signed-in session only, never an API key.
  • Tracker: what the tracking script loads and sends to. These endpoints live outside /api/v1 and take no credential.
  • MCP: the MCP server at /api/mcp, and the /.well-known/ documents MCP clients read to sign in with OAuth.
  • Auth: the dashboard's sign-in and account endpoints under /api/auth/ (sign-up, sign-in, sessions, two-factor authentication, organizations, members and invitations). One page per method covers every path. They are for the dashboard only: their requests and answers can change in any version, their errors have a shape of their own, and they take a session cookie, never an API key. MCP clients use the OAuth endpoints among them, described in Connect with OAuth.
  • Admin: /api/v1/admin/, the usage, jobs and backups of an instance, for its system administrators (signed-in session only).

Conventions on these pages

  • Paths use {name} for path parameters: {siteId} is a site's public id, {orgId} an organization's id, and {*} stands for the rest of the path.
  • The server is https://pilotfox.app. A self-hosted instance is at its own PUBLIC_URL: in the document, the server URL is {protocol}://{host}, with host a variable that code generators let you set.
  • Errors follow the error envelope on every /api/v1 endpoint.
  • Analytics endpoints answer { data, meta }, most others { data }, and some a status with no body; see Responses.
  • Each /api/v1 operation of the document also carries the access rule the API enforces, in the vendor extension x-pilotfox-access (kind, permission, and the flags behind the notes of Permission per endpoint), for tools that read the document.

On this page