API reference map
The most useful Lucida endpoints grouped by area, with method, path and the scope that opens them, plus where to get the full OpenAPI document.
This is the short map, not the whole API: about 90 of the roughly 890 routes, grouped by what you want to do. The complete, machine-readable description is the OpenAPI document:
curl -sS "$LUCIDA_API/v1/openapi.json" -o lucida-openapi.json # management API and the capture routes (tag: capture)
curl -sS "$LUCIDA_API/v1/query.schema.json" # JSON Schema of the query languageThe document's servers is https://lucidace.com (the API host). Capture routes (/v1/batch, /v1/capture, /v1/s2s/batch, /v1/flags, /v1/profiles/*, /v1/replay, ...) carry a path-level servers override of https://capture.lucidace.com, so a generated client sends them to the capture host; there is one document for both hosts, not two. A self-hosted instance answers with its own configured public URL. The ten most used routes (capture, batch, flags, query, sql, insights, flags create, experiments create, keys create) have request example bodies, and GET /persons a curl sample (x-codeSamples).
Postman and Bruno: generate a Postman v2.1 collection and a Bruno folder from the same document with node scripts/openapi-postman.mjs --out dist/api-collections (one folder per tag; set baseUrl and apiKey). Also see Rate limits, API versioning and Outbound webhooks.
New to the API? Start with the Developer guide. $LUCIDA_API and $LUCIDA_CAPTURE are defined there. In this table {p} stands for /v1/projects/{project_id}.
How scopes read
Every route that accepts a key says what it needs in the OpenAPI document: x-required-scopes (all of these scopes; broader ones such as *:read, *:write and admin also open the route), x-required-scopes-any (and one of these), x-required-scopes-note (an extra a particular request needs), or x-required-key-kind for the capture and SCIM routes, which take a key kind instead of scopes. A route whose security lists only session cannot be used with a key. The 403 or 404 a call returns is authoritative. A key that can see a resource but lacks the level for an action gets 403; one that cannot see it at all gets 404. GET /v1/scopes is the full catalogue.
<resource>:read/<resource>:write: resources areinsight,notebook,action,dashboard,replay,flag,experiment,cohort,person,connector,settings. Write implies read.pii:readunmasks personal data.*:read/*:writecover project resources (includingsettings,connector, webhooks and transformations), with these exceptions, which must be named:pii:read(unmasked personal data),data_cataloganddata_catalog_approval(creating metrics and approving catalog changes),endpoint:write,pipeline:write,profiles:read,capture,adminanddelegate, members and billing. Minting and revoking keys needsadminor an account key withproject:write. A 403 names the missing scope; a key that cannot even see the resource gets 404. Connector routes (create, update, test, sync, delete) needconnector:write;settings:writealone does not reach them.query:readanddraft:writeare the older broad read names.adminacts as a project admin.project:read,project:write,org:readandorg:writeexist only on account keys.project:setupis a bundle for provisioning from code:flag:write,experiment:write,cohort:write,action:writeanddata_catalog.Also:
data_catalog,endpoint:read/endpoint:write,pipeline:read/pipeline:write,profiles:read,delegate.
Identity, organizations, projects, keys
Method and path | Scope | Purpose |
|---|---|---|
| any key | a session or account key: you and your organizations (an account key also gets |
| any key | all scope names |
| none |
|
|
| organizations you can reach (cursor page). With an account key restricted by |
|
| create an organization; body |
|
| one organization |
|
| rename and change organization defaults |
|
| projects of an organization |
|
| create a project; answers |
|
| one project |
|
| name, time zone, retention, IP capture, tags |
|
| delete the project and its data |
|
| environments a key can be bound to |
|
| key metadata, never secrets; |
|
| mint a key: |
|
| revoke a key |
| list: account key; create: session only | list and create account keys. Never hand an unrestricted account key to an integrator: mint theirs with |
Org administration (members, invites, roles, audit, billing, SSO, SCIM tokens) is reachable only by an account key restricted to one org with the matching area scope (members:write, sso:read, ...): see Org admin API. Not reachable by keys: organization deletion.
Capture host
Method and path | Key | Purpose |
|---|---|---|
| public or secret | up to 1000 events, 20 MB. A personal (user-scoped) key is |
| public or secret | one event, 1 MB |
| secret | servers and historical imports; events older than the project retention come back in |
| public or secret (authenticated before the body is validated) | evaluate flags for one user (decides only; |
| public or secret (definitions and remote-config: secret) | SDK config, local-evaluation definitions, one remote-config payload, definition-change stream |
| public or secret | rrweb chunks |
| secret with | low-latency profiles (Profile API) |
| token / key | tracking pixel and its signing |
| project token | PostHog, Mixpanel, Amplitude and OpenFeature compatibility routes (all in the OpenAPI |
Pages: Send events over HTTP, Evaluate flags over HTTP.
Events, persons, groups, taxonomy
Method and path | Scope | Purpose |
|---|---|---|
|
| recent events, newest first; filters |
|
| CSV, 10 000 rows |
|
| live tail |
|
| hard delete of the definition and its property definitions ( |
|
| create a definition for an event that has no traffic yet (upsert; |
|
| event names seen, with last-seen time; filter |
|
| property names and values for pickers |
|
| search by |
|
| one person |
|
| set person properties; |
|
| one person's events |
|
| CSV, 100 000 rows |
|
| erasure request (deletes events, person, id mapping) |
|
| groups (accounts, companies) |
Queries, insights, dashboards
Method and path | Scope | Purpose |
|---|---|---|
|
| run a query |
|
| run one |
|
| poll or cancel a slow query |
|
| list ( |
|
| one insight |
|
| rendered chart |
|
| list and create |
|
| one dashboard |
|
| add a tile |
|
| move, resize, remove |
|
| every tile's current result |
|
| dynamic or static cohorts |
|
| named sets of interactions |
| read: | governed metrics (also used by experiments); |
|
| notes pinned to a time |
|
| notebooks |
|
| saved queries served as your own API endpoints |
Pages: Queries and insights, Cohorts and actions.
Feature flags
Method and path | Scope | Purpose |
|---|---|---|
|
| list ( |
|
| one flag; |
|
|
|
|
|
|
|
| kill switch, off in every environment |
|
| the definitions the gateway would serve for one context, plus that resolved context; evaluate locally or call |
|
| change history, evaluation counts, health |
|
| definitions the gateway serves |
|
| staged rollouts and schedules |
|
| reusable audience segments |
Page: Flag governance.
Experiments
Method and path | Scope | Purpose |
|---|---|---|
|
| list and create |
|
| one experiment; |
|
|
|
|
| serve the winner to everyone |
|
| housekeeping |
|
| per-metric results, SRM and guardrails |
|
| cumulative and daily effect |
|
| pre-launch checks |
|
| sample size and duration |
|
| holdout groups |
Page: Experiments over the API.
Replay
Method and path | Scope | Purpose |
|---|---|---|
|
| list recordings; every field optional; relative dates ( |
|
| metadata, chunk links, markers |
|
| self-contained HTML player |
|
| readable transcript |
|
| tag, delete |
|
| comment on a recording |
|
| saved lists of recordings |
|
| a person's recordings |
Page: Replay privacy.
Web analytics
Method and path | Scope | Purpose |
|---|---|---|
|
| visitors, sessions, pageviews, bounce, engagement; |
|
| top pages, sources, devices, countries, UTM; |
|
| visitors right now |
|
| marketing attribution |
|
| conversion goals |
|
| bounce rule, referrer exclusions, host allowlist |
|
| public web report link |
Pages: Web analytics over the API, Marketing attribution.
Alerts, notifications, webhooks
Method and path | Scope | Purpose |
|---|---|---|
|
| create |
|
| replay a rule over past days |
|
| list alerts |
|
| change, remove |
|
| fire and resolve history |
|
| what you can subscribe to |
|
| outbound webhooks |
|
| one endpoint; unknown |
|
| new secret, shown once; old one still signs for |
|
| send a |
|
| delivery log; |
Page: Alerts on insights.
Sharing and exports
Method and path | Scope | Purpose |
|---|---|---|
|
| public link; returns |
|
| same for a dashboard |
|
| notebooks, replays, heatmaps |
| same | list (no tokens) and revoke |
| none | JSON behind a public page |
|
| groups CSV |
Page: Share links and exports.
Connectors, imports and other areas
Method and path | Scope | Purpose |
|---|---|---|
|
| catalogue, list, create sources and destinations |
|
| test, run now, run history |
| none | OAuth for apps and MCP clients |
| session or | register OAuth apps |
|
| in-app guides |
|
| in-session interventions |
|
| early-access programs |
|
| event definitions in bulk |
|
| project activity log |
| account key | MCP server; stateless, |
Connector routes are served by the connectors service behind the same API host; they are included in /v1/openapi.json (there is no separate connectors spec). See Integration recipes for what to connect.