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.
| Section | What it covers | Operations |
|---|---|---|
| System | Liveness and readiness probes, and the instance settings the web app reads first. | 3 |
| Account | The signed-in user, their organizations, their email report subscriptions and what deleting the account would do. | 3 |
| Organizations | Organization-wide reports and who sees which site: restricted members' and teams' site grants. | 5 |
| API keys | An organization's API keys: list, create (the only answer with the key), delete. | 3 |
| Sites | Sites, their settings, the tracking snippet, install check and first-party proxy. | 10 |
| Share links | Read-only links to one site's dashboard, and what a link opens. | 4 |
| Analytics | Traffic reports of a site: overview, time series, breakdowns, pages, heatmap and web vitals, and referrer icons. | 10 |
| Events | Custom and autocaptured events: names, properties, counts and the raw event list. | 6 |
| Errors | JavaScript errors the tracker captured, grouped by fingerprint. | 4 |
| Geography | Countries, regions, cities and map points of visitors, and the map tiles. | 6 |
| Live | Who is on the site now: counts, visitors and the server-sent event stream. | 4 |
| Bots | Bot and AI crawler traffic that ingest set aside from the visitor reports. | 4 |
| People | Visitors and identified users: profiles, traits, sessions and erasure. | 9 |
| Sessions | Sessions and their event timelines. | 3 |
| Goals | Conversion goals, their stats and the conversions behind them. | 9 |
| Funnels | Saved and ad hoc funnels, their reports and the sessions in each step. | 8 |
| Journeys | Paths visitors take through the site, and cohort retention. | 3 |
| Segments | Saved filters, which the analytics reports apply with segment=. | 5 |
| Annotations | Notes on a date or a date range of a site's charts, or of every site of the organization. | 4 |
| Replays | Session recordings: list, play back and delete. | 4 |
| Revenue | Revenue reports, subscriptions and payments, from connected providers and the payments API. | 11 |
| Payment providers | Connections to Stripe, Polar and Dodo Payments, whose payments feed the revenue reports. | 16 |
| Affiliates | A site's affiliates, their reports, and the portal each one can open. | 9 |
| Search Console | Google Search Console connections, property links and search reports. | 18 |
| Notifications | New-sale notifications and email report settings of a site. | 12 |
| Imports | Bring history in from other analytics tools or a PilotFox export. | 5 |
| Exports | A site's raw events as NDJSON. | 1 |
| Ingest | Server-side event ingest and identify, with API keys. | 2 |
| Tracker | The browser tracker: its scripts and the endpoints it sends to (no credential). | 6 |
| MCP | The Model Context Protocol server, and the OAuth discovery documents of its clients. | 4 |
| Auth | The web app's sign-in and account endpoints, and the OAuth authorization server of MCP clients. | 4 |
| Admin | Instance 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/v1and 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 ownPUBLIC_URL: in the document, the server URL is{protocol}://{host}, withhosta variable that code generators let you set. - Errors follow the error envelope on every
/api/v1endpoint. - Analytics endpoints answer
{ data, meta }, most others{ data }, and some a status with no body; see Responses. - Each
/api/v1operation of the document also carries the access rule the API enforces, in the vendor extensionx-pilotfox-access(kind,permission, and the flags behind the notes of Permission per endpoint), for tools that read the document.