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.

Embed
Preview of the card
<a href="https://lucidace.com/help/api-reference-map"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/9058f583-7b17-455e-a333-0c235861a3ef/social-card.svg?v=3e7ae33eec8b" alt="API reference map" width="600" height="315"></a>

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 language

The 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 are insight, notebook, action, dashboard, replay, flag, experiment, cohort, person, connector, settings. Write implies read. pii:read unmasks personal data.

  • *:read / *:write cover project resources (including settings, connector, webhooks and transformations), with these exceptions, which must be named: pii:read (unmasked personal data), data_catalog and data_catalog_approval (creating metrics and approving catalog changes), endpoint:write, pipeline:write, profiles:read, capture, admin and delegate, members and billing. Minting and revoking keys needs admin or an account key with project:write. A 403 names the missing scope; a key that cannot even see the resource gets 404. Connector routes (create, update, test, sync, delete) need connector:write; settings:write alone does not reach them. query:read and draft:write are the older broad read names.

  • admin acts as a project admin. project:read, project:write, org:read and org:write exist only on account keys. project:setup is a bundle for provisioning from code: flag:write, experiment:write, cohort:write, action:write and data_catalog.

  • Also: data_catalog, endpoint:read / endpoint:write, pipeline:read / pipeline:write, profiles:read, delegate.

Identity, organizations, projects, keys

Method and path

Scope

Purpose

GET /v1/me

any key

a session or account key: you and your organizations (an account key also gets key_scopes). A project key with read access: only {user:{id}}, the member it acts for; a capture-only key: 404

GET /v1/scopes

any key

all scope names

GET /v1/version

none

{commit, built_at} of the running build (/healthz stays plain ok)

GET /v1/orgs

org:read

organizations you can reach (cursor page). With an account key restricted by org_ids it lists only those orgs: use it to check a key before you hand it to a third party

POST /v1/orgs

org:write

create an organization; body {name}

GET /v1/orgs/{org_id}

org:read

one organization

PATCH /v1/orgs/{org_id}

org:write

rename and change organization defaults

GET /v1/orgs/{org_id}/projects

project:read

projects of an organization

POST /v1/orgs/{org_id}/projects

project:write

create a project; answers {project, keys, environments, server_key_hint}; keys holds two keys: the public key and a Secret key whose scopes are ["capture"] (send events only; its secret is shown once). For a key that reads or erases, mint one with POST /v1/projects/{project_id}/keys and explicit scopes

GET /v1/projects/{project_id}

settings:read

one project

PATCH /v1/projects/{project_id}

settings:write

name, time zone, retention, IP capture, tags

DELETE /v1/projects/{project_id}

project:write or admin

delete the project and its data

GET {p}/environments

settings:read

environments a key can be bound to

GET {p}/keys

project:read

key metadata, never secrets; ?limit=&cursor= returns {data, next_cursor}

POST {p}/keys

project:write

mint a key: {name, kind, scopes, environment?, expires_at?}

DELETE {p}/keys/{key_id}

project:write

revoke a key

GET /v1/me/keys, POST /v1/me/keys

list: account key; create: session only

list and create account keys. Never hand an unrestricted account key to an integrator: mint theirs with org_ids:[<their org>]

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

POST /v1/batch

public or secret

up to 1000 events, 20 MB. A personal (user-scoped) key is 401 on every capture route

POST /v1/capture

public or secret

one event, 1 MB

POST /v1/s2s/batch

secret

servers and historical imports; events older than the project retention come back in rejected as older_than_retention; kept fix-ups come back in warnings

POST /v1/flags, POST /v1/flags/batch

public or secret (authenticated before the body is validated)

evaluate flags for one user (decides only; send_exposure:true also records exposures)

GET /v1/config, GET /v1/flags/definitions, GET /v1/flags/{key}/remote-config, GET /v1/flags/stream

public or secret (definitions and remote-config: secret)

SDK config, local-evaluation definitions, one remote-config payload, definition-change stream

POST /v1/replay

public or secret

rrweb chunks {session_id, seq, events, window_id?}; seq required (400 without), window_id optional; plain JSON, base64 gzip events with ?compression=gzip, or a gzipped body

GET /v1/profiles/{distinct_id}, GET /v1/profiles/groups/{type_index}/{key}

secret with profiles:read

low-latency profiles (Profile API)

GET /v1/p.gif, POST /v1/pixel/sign

token / key

tracking pixel and its signing

POST /decide, POST /track, POST /2/httpapi, /ofrep/*

project token

PostHog, Mixpanel, Amplitude and OpenFeature compatibility routes (all in the OpenAPI capture tag)

Pages: Send events over HTTP, Evaluate flags over HTTP.

Events, persons, groups, taxonomy

Method and path

Scope

Purpose

GET {p}/events

*:read

recent events, newest first; filters event, person, host, path, prop_key/prop_value

GET {p}/events/export.csv

*:read

CSV, 10 000 rows

GET {p}/events/live

*:read

live tail

DELETE {p}/event-definitions/{name}

insight:write

hard delete of the definition and its property definitions (204; captured events stay)

PUT {p}/event-definitions/{name}

insight:write

create a definition for an event that has no traffic yet (upsert; PATCH of an unseen event is 404)

GET {p}/event-definitions

*:read

event names seen, with last-seen time; filter ?q=, ?hidden=false, ?verified=true (without a filter hidden events are listed too)

GET {p}/property-definitions, GET {p}/property-values

*:read

property names and values for pickers

GET {p}/persons

person:read

search by q, distinct_id, or a property

GET {p}/persons/{id}

person:read

one person

PATCH {p}/persons/{id}/properties

person:write

set person properties; 202 {event_uuid, distinct_id} (PATCH {p}/persons/{id} returns the merged person)

GET {p}/persons/{id}/events

person:read

one person's events

GET {p}/persons/export.csv

person:read

CSV, 100 000 rows

DELETE {p}/persons/{id}

person:write

erasure request (deletes events, person, id mapping)

GET {p}/groups, GET {p}/group_types

person:read

groups (accounts, companies)

Queries, insights, dashboards

Method and path

Scope

Purpose

POST {p}/query

*:read

run a query {query, validate_only?, refresh?}; 202 with query_id when slow

POST {p}/sql

insight:read

run one SELECT {sql, variables?, date_range?, ...} (relative dates accepted); validate_only returns the real columns; see Run SQL over the API

GET {p}/query/{query_id}, DELETE ...

*:read

poll or cancel a slow query

GET {p}/insights, POST {p}/insights

insight:read / insight:write

list (q, tag, folder) and create {name, query, ...}

GET, PATCH, DELETE {p}/insights/{id}

insight:*

one insight

GET {p}/insights/{id}/chart.svg

insight:read

rendered chart

GET {p}/dashboards, POST {p}/dashboards

dashboard:*

list and create {name, filters?, tags?, pinned?}

GET, PATCH, DELETE {p}/dashboards/{id}

dashboard:*

one dashboard

POST {p}/dashboards/{id}/tiles

dashboard:write

add a tile {insight_id} or {kind:"text", text_body}

PATCH, DELETE {p}/dashboards/{id}/tiles/{tile_id}

dashboard:write

move, resize, remove

GET {p}/dashboards/{id}/results

dashboard:read

every tile's current result

GET {p}/cohorts, POST {p}/cohorts

cohort:*

dynamic or static cohorts

GET {p}/actions, POST {p}/actions

action:*

named sets of interactions

GET {p}/metrics, POST {p}/metrics

read: insight:read; write: data_catalog or data_catalog_approval

governed metrics (also used by experiments); *:write does not include them

GET {p}/annotations, POST {p}/annotations

*:*

notes pinned to a time

GET {p}/notebooks, POST {p}/notebooks

notebook:*

notebooks

GET {p}/endpoints, POST {p}/endpoints, POST {p}/endpoints/{slug}/run

endpoint:*; run: a scope-less secret key, or endpoint:read, query:read, a broad read or admin (else 403)

saved queries served as your own API endpoints

Pages: Queries and insights, Cohorts and actions.

Feature flags

Method and path

Scope

Purpose

GET {p}/flags, POST {p}/flags

flag:read / flag:write

list (q, limit, cursor) and create {key, kind, enabled, filters, variants, ...}

GET, PATCH, DELETE {p}/flags/{id}

flag:*

one flag; PATCH of a flag whose experiment is running is 409 experiment_running unless ?force=true (so are toggle, rollout, env copy, env-override removal and bulk; kill is always allowed; rollout plans, cross-project copy and change-request apply are not guarded)

POST {p}/flags/{id}/toggle

flag:write

{enabled}

PATCH {p}/flags/{id}/rollout

flag:write

{rollout_pct} for the first condition

POST {p}/flags/{id}/kill

flag:write

kill switch, off in every environment

POST {p}/flags/dry-run

flag:read

the definitions the gateway would serve for one context, plus that resolved context; evaluate locally or call POST /v1/flags on the capture host

GET {p}/flags/{id}/history, .../usage, .../health

flag:read

change history, evaluation counts, health

GET {p}/flag-definitions?environment=

flag:read

definitions the gateway serves

POST {p}/flags/{id}/rollouts, .../schedules, .../guarded-rollout

flag:write

staged rollouts and schedules

GET {p}/flag-segments, POST {p}/flag-segments

flag:*

reusable audience segments

Page: Flag governance.

Experiments

Method and path

Scope

Purpose

GET {p}/experiments, POST {p}/experiments

experiment:*

list and create

GET, PATCH, DELETE {p}/experiments/{id}

experiment:*

one experiment; DELETE is 409 while it runs

POST {p}/experiments/{id}/{action}

experiment:write

start, pause, resume, stop

POST {p}/experiments/{id}/ship

experiment:write

serve the winner to everyone

POST {p}/experiments/{id}/archive, .../unarchive, .../duplicate

experiment:write

housekeeping

GET {p}/experiments/{id}/results

experiment:read

per-metric results, SRM and guardrails

GET {p}/experiments/{id}/results/series, .../results/daily

experiment:read

cumulative and daily effect

GET {p}/experiments/{id}/checklist

experiment:read

pre-launch checks

POST {p}/experiments/power

experiment:read

sample size and duration

GET {p}/holdouts, POST {p}/holdouts

experiment:*

holdout groups

Page: Experiments over the API.

Replay

Method and path

Scope

Purpose

POST {p}/replays/search

replay:read

list recordings; every field optional; relative dates (-7d) accepted; {data, next_cursor}

GET {p}/replays/{session_id}

replay:read

metadata, chunk links, markers

GET {p}/replays/{session_id}/export/html

replay:read

self-contained HTML player

GET {p}/replays/{session_id}/transcript

replay:read

readable transcript

PATCH, DELETE {p}/replays/{session_id}

replay:write

tag, delete

POST {p}/replays/{session_id}/comments

replay:write

comment on a recording

GET {p}/replay-playlists, POST {p}/replay-playlists

replay:*

saved lists of recordings

GET {p}/persons/{id}/recordings

person:read

a person's recordings

Page: Replay privacy.

Web analytics

Method and path

Scope

Purpose

GET {p}/web/overview

*:read

visitors, sessions, pageviews, bounce, engagement; from, to, compare, host

GET {p}/web/breakdown?dimension=

*:read

top pages, sources, devices, countries, UTM; limit default 100, above 1000 is clamped, 0 is 400

GET {p}/web/realtime

*:read

visitors right now

GET {p}/web/attribution

*:read

marketing attribution

GET {p}/web/goals, POST {p}/web/goals

*:*

conversion goals {name, kind, target}

GET {p}/web/settings, PUT {p}/web/settings

settings:*

bounce rule, referrer exclusions, host allowlist

POST {p}/web/shares

*:write

public web report link

Pages: Web analytics over the API, Marketing attribution.

Alerts, notifications, webhooks

Method and path

Scope

Purpose

POST {p}/insights/{id}/alerts

insight:write

create {name, condition, channels, check_interval?}

POST {p}/insights/{id}/alerts/simulate

insight:read

replay a rule over past days

GET {p}/alerts

insight:read

list alerts

PATCH, DELETE {p}/alerts/{id}

insight:write

change, remove

GET {p}/alerts/{id}/events

insight:read

fire and resolve history

GET {p}/webhooks/event-types

settings:read

what you can subscribe to

GET {p}/webhooks, POST {p}/webhooks

settings:*

outbound webhooks {url, events, name?, secret?}

GET, PATCH, DELETE {p}/webhooks/{id}

settings:*

one endpoint; unknown PATCH fields are 400

POST {p}/webhooks/{id}/rotate-secret

settings:write

new secret, shown once; old one still signs for overlap_hours (default 24)

POST {p}/webhooks/{id}/test

settings:write

send a webhook.test delivery now; it is logged once and never retried (a failed test shows status: failed and next_attempt_at: null)

GET {p}/webhooks/{id}/deliveries

settings:read

delivery log; next_attempt_at is set only while status is pending. Real events retry with backoff (30 s, doubling, capped at 6 h) up to 8 attempts, then failed

Page: Alerts on insights.

Sharing and exports

Method and path

Scope

Purpose

POST {p}/insights/{id}/shares

insight:write

public link; returns url and token once

POST {p}/dashboards/{id}/shares

dashboard:write

same for a dashboard

POST {p}/notebooks/{id}/shares, POST {p}/replays/{session_id}/shares, POST {p}/heatmaps/shares

*:write

notebooks, replays, heatmaps

GET, DELETE .../shares, .../shares/{share_id}

same

list (no tokens) and revoke

GET /v1/public/{kind}/{token}

none

JSON behind a public page

GET {p}/groups/export.csv?type_index=0

person:read

groups CSV

Page: Share links and exports.

Connectors, imports and other areas

Method and path

Scope

Purpose

GET {p}/connectors/catalog, GET, POST {p}/connectors

connector:*

catalogue, list, create sources and destinations

POST {p}/connectors/{id}/test, .../sync, GET .../runs

connector:*

test, run now, run history

POST /v1/oauth/token, GET /.well-known/oauth-authorization-server

none

OAuth for apps and MCP clients

GET /v1/orgs/{org_id}/oauth-apps, POST ...

session or admin

register OAuth apps

GET {p}/guides, POST {p}/guides

*:*

in-app guides

GET {p}/interventions, POST {p}/interventions

*:*

in-session interventions

GET {p}/early-access, POST {p}/early-access

*:*

early-access programs

GET {p}/taxonomy/events/export.csv, POST {p}/taxonomy/events/import

*:*

event definitions in bulk

GET {p}/activity

*:read

project activity log

POST /mcp (MCP host)

account key

MCP server; stateless, tools/list shows only the tools the key's scopes allow

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.

Updated