capture
GET
https://lucidace.com /v1/p.gif Tracking pixel
Public key as k (or api_key), event name as e. Signed pixels (sig, x) are verified; see POST /v1/pixel/sign.
Parameters
kstringqueryrequiredPublic key.
estringqueryrequiredEvent name.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/p.gif?k=<k>&e=<e>" \
-H "Authorization: Bearer $LUCIDACE_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 A 1x1 GIF; the event is recorded from the query string.
"string"
401 Missing or invalid api key (or a public key on a secret-only route).
404 Not found, or the key may not read it.
429 Rate limit; honour Retry-After.
POST
https://lucidace.com /v1/pixel/sign Sign a pixel URL (secret key only)
Secret key only. Returns a pixel URL carrying the project's public key and a signature, for emails and server-rendered pages.
Request body
application/json
{}Code samples
cURL
curl -X POST "https://lucidace.com/v1/pixel/sign" \
-H "Authorization: Bearer $LUCIDACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
{url, expires_at}.{}400 Malformed body (problem+json).
401 Missing or invalid api key.
429 Rate limit; honour Retry-After.
GET
https://lucidace.com /v1/profiles/groups/{type_index}/{key} Read one group profile
Secret key with the profiles:read scope.
Parameters
type_indexstringpathrequiredGroup type index, 0 to 4.
keystringpathrequiredThe group key.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/profiles/groups/{type_index}/{key}" \
-H "Authorization: Bearer $LUCIDACE_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The group profile.
{}401 Missing or invalid api key (or a public key on a secret-only route).
404 Not found, or the key may not read it.
429 Rate limit; honour Retry-After.
GET
https://lucidace.com /v1/profiles/{distinct_id} Read one person profile
Secret key with the profiles:read scope. Other keys and projects with the profile API off answer 404.
Parameters
distinct_idstringpathrequiredThe person's distinct id.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/profiles/{distinct_id}" \
-H "Authorization: Bearer $LUCIDACE_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The profile: properties, traits and cohort memberships.
{}401 Missing or invalid api key (or a public key on a secret-only route).
404 Not found, or the key may not read it.
429 Rate limit; honour Retry-After.
POST
https://lucidace.com /v1/replay Send a chunk of session recording
Public or secret key. Up to 10 MB decompressed. Three equivalent forms: plain JSON events; events as a base64 gzip string (with ?compression=gzip); or the whole body gzipped (Content-Encoding: gzip or ?compression=gzip). seq is required. Answers {"status":1}.
Request body
application/json
api_keystringProject key; or
Authorization: Bearer <key>.eventsobject[] | stringrequiredrrweb events: a Meta (type 4) and a FullSnapshot (type 2) to start, then Incremental (type 3). Either the JSON array, or a string holding the base64 of the gzipped JSON array (send
?compression=gzip with it). Alternatively gzip the whole request body (Content-Encoding: gzip or ?compression=gzip).seqintegerrequiredMonotonic per window; resets when the session rotates.
session_idstringrequiredThe session's UUID; set the same value as
$session_id on the session's events to link them.window_idstringOne id per tab or window. Optional; chunks without one share a single window.
{
"api_key": "string",
"events": [
{}
],
"seq": 0,
"session_id": "string",
"window_id": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/replay" \
-H "Authorization: Bearer $LUCIDACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api_key":"string","events":[{}],"seq":0,"session_id":"string","window_id":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Accepted (at least once; dedupe is by event uuid).
Example
{
"status": 1
}Schema
statusinteger400 Malformed body or event (problem+json); nothing was accepted, retry is safe.
401 Missing or invalid api key (or a public key on the secret-only route).
413 Body, batch (1000 events) or single event too large.
429 Rate or quota limit; honour Retry-After.
POST
https://lucidace.com /v1/s2s/batch Send events from a server (secret key only)
Secret key only; historical timestamps are kept and events drain behind live data.
Request body
application/json
api_keystringProject key (
lc_pk_... public, or secret). May instead be Authorization: Bearer <key>.batchCaptureEvent[]requiredShow child parameters
distinct_idstringrequiredWho did it (your user id or an anonymous id).
eventstringrequiredEvent name, e.g.
purchase; $-prefixed names are Lucida's own.propertiesobject$lc_* keys are stripped. Strings are cut at 64 KiB; an event over about 1 MiB is rejected with 413.timestampstringRFC 3339. Public keys: outside -30 days..+1 hour it is replaced by arrival time. Omitted = arrival time.
uuidstringIdempotency key: a retry with the same uuid is deduplicated. A non-UUID value discards the event with a warning.
historical_migrationbooleanSecret key only: ingest on the backfill lane.
sent_atstringClient send time; used to correct clock skew.
{
"api_key": "string",
"batch": [
{
"distinct_id": "string",
"event": "string",
"properties": {},
"timestamp": "2024-01-01T00:00:00Z",
"uuid": "string"
}
],
"historical_migration": true,
"sent_at": "2024-01-01T00:00:00Z"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/s2s/batch" \
-H "Authorization: Bearer $LUCIDACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api_key":"string","batch":[{"distinct_id":"string","event":"string","properties":{},"timestamp":"2024-01-01T00:00:00Z","uuid":"string"}],"historical_migration":true,"sent_at":"2024-01-01T00:00:00Z"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
400 Malformed body or event (problem+json); nothing was accepted, retry is safe.
401 Missing or invalid api key (or a public key on the secret-only route).
413 Body, batch (1000 events) or single event too large.
429 Rate or quota limit; honour Retry-After.
Updated