sharing

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-sharing"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/764931cd-22d1-4880-9037-f05e758b00f5/social-card.svg?v=3e7ae33eec8b" alt="sharing" width="600" height="315"></a>
POSThttps://lucidace.com/v1/projects/{project_id}/embed-tokensScope insight:read

Mint a signed, short-lived token that reads one tenant's aggregates. Needs read access to insights (a read-only key is enough): the token can never see more than its minter.

Parameters

project_idstringpathrequired

Request body

application/json
allowed_originsstring[]
Origins (https://app.example.com) allowed to frame the embed or call the JSON view from a browser; empty allows any.
eventsstring[]
Event names the token may read (empty: all of the tenant's events).
hide_brandingboolean
Leave out the Lucida branding in the embed.
tenant_idstringrequired
The tenant whose aggregates the token opens (1 to 128 characters).
themestring
Embed theme: light, dark or system (default; ?theme= overrides).
ttl_secondsinteger
Lifetime in seconds (default 3600, 60 to 86400). Tokens cannot be revoked: keep them short.
{
  "allowed_origins": [
    "string"
  ],
  "events": [
    "string"
  ],
  "hide_branding": true,
  "tenant_id": "string",
  "theme": "string",
  "ttl_seconds": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/embed-tokens" \
  -H "Content-Type: application/json" \
  -d '{"allowed_origins":["string"],"events":["string"],"hide_branding":true,"tenant_id":"string","theme":"string","ttl_seconds":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "api_url": "string",
  "embed_url": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "tenant_id": "string",
  "token": "string"
}
Schema
api_urlstringrequired
JSON stats (same parameters).
embed_urlstringrequired
Iframe page (?days=&event=&breakdown=&theme=).
expires_atstringrequired
tenant_idstringrequired
tokenstringrequired
lc_emb_...: pass in the URL of the views below.
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/sharesScope insight:read

Parameters

project_idstringpathrequired
urlstringqueryrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/shares?url=<url>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of Share for the page, newest first
Example
{
  "data": [
    {
      "allowed_origins": [
        "string"
      ],
      "created_at": "2024-01-01T00:00:00Z",
      "expires_at": "2024-01-01T00:00:00Z",
      "id": "string",
      "options": {},
      "password_protected": true,
      "resource_id": "string",
      "resource_type": "string",
      "revoked_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataShare[]required
Show child parameters
allowed_originsstring[]required
Origins allowed to frame the embed (empty: any).
created_atstringrequired
expires_atstring
idstringrequired
optionsobjectrequired
{hide_branding?, hide_legend?, theme?: light|dark|system}.
password_protectedbooleanrequired
Viewers must enter a password first.
resource_idstringrequired
resource_typestringrequired
revoked_atstring
next_cursorstring
400
404
POSThttps://lucidace.com/v1/projects/{project_id}/heatmaps/sharesScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
expires_in_daysinteger
Lifetime in days (default 7, at most 90).
passwordstring
Viewers must enter this password (8 to 200 characters) and unlock with POST /v1/public/heatmaps/{token}/unlock; stored only as an argon2id hash.
urlstringrequired
Page path or URL whose heatmaps the link opens.
{
  "expires_in_days": 0,
  "password": "string",
  "url": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/heatmaps/shares" \
  -H "Content-Type: application/json" \
  -d '{"expires_in_days":0,"password":"string","url":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 the token is shown once
Example
{
  "allowed_origins": [
    "string"
  ],
  "created_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "options": {},
  "password_protected": true,
  "resource_id": "string",
  "resource_type": "string",
  "revoked_at": "2024-01-01T00:00:00Z",
  "token": "string",
  "url": "string"
}
Schema
allowed_originsstring[]required
Origins allowed to frame the embed (empty: any).
created_atstringrequired
expires_atstring
idstringrequired
optionsobjectrequired
{hide_branding?, hide_legend?, theme?: light|dark|system}.
password_protectedbooleanrequired
Viewers must enter a password first.
resource_idstringrequired
resource_typestringrequired
revoked_atstring
tokenstringrequired
Shown once; only its hash is stored.
urlstring
The public page, absolute from LC_PUBLIC_URL (/share/<kind>/<token>).
400
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/heatmaps/shares/{share_id}Scope insight:write

Parameters

project_idstringpathrequired
share_idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/heatmaps/shares/{share_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/insights/{id}/sharesScope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/insights/{id}/shares"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of Share, newest first

Same as 200 · GET /v1/projects/{project_id}/heatmaps/shares

404
POSThttps://lucidace.com/v1/projects/{project_id}/insights/{id}/sharesScope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
allowed_originsstring[]
Embeds only: origins (https://app.example.com) allowed to frame the view; empty allows any.
expires_in_daysinteger
Lifetime in days (default 7, at most 90).
never_expiresboolean
No expiry at all; needs the org setting permanent_shares (403 otherwise).
optionsobject
Display options of the public view and embed.
Show child parameters
hide_brandingboolean
Leave out the Lucida branding.
hide_legendboolean
Leave out chart legends.
lock_filtersobject
Property group ({"and": [...]}, may hold a cohort filter) ANDed into every query the public view runs; viewers cannot remove it.
show_queriesboolean
Notebooks only: show the text of query blocks (hidden by default, queries can name people).
show_recordingsboolean
Notebooks only, project admins only (G146): replay and playlist blocks play in the shared view (masked at capture, no person ids, no comments). Withheld by default.
show_rowsboolean
Notebooks only, project admins only (G146): people, event, group and cohort lists share their rows (the block's chosen property columns; identities and email-like columns are always dropped) instead of per-day counts. Off by default.
themestring
light, dark or system (the default).
viewer_filtersboolean
Viewers may add their own event, person or session property filters (?filters=), applied on top of the lock.
passwordstring
Viewers must enter this password (8 to 200 characters); stored only as an argon2id hash.
{
  "allowed_origins": [
    "string"
  ],
  "expires_in_days": 0,
  "never_expires": true,
  "options": {
    "hide_branding": true,
    "hide_legend": true,
    "lock_filters": {},
    "show_queries": true,
    "show_recordings": true,
    "show_rows": true,
    "theme": "string",
    "viewer_filters": true
  },
  "password": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/insights/{id}/shares" \
  -H "Content-Type: application/json" \
  -d '{"allowed_origins":["string"],"expires_in_days":0,"never_expires":true,"options":{"hide_branding":true,"hide_legend":true,"lock_filters":{},"show_queries":true,"show_recordings":true,"show_rows":true,"theme":"string","viewer_filters":true},"password":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/insights/{id}/shares/{share_id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired
share_idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/insights/{id}/shares/{share_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/notebooks/{id}/sharesScope notebook:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/notebooks/{id}/shares"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of Share, newest first

Same as 200 · GET /v1/projects/{project_id}/heatmaps/shares

404
POSThttps://lucidace.com/v1/projects/{project_id}/notebooks/{id}/sharesScope notebook:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
allowed_originsstring[]
Embeds only: origins (https://app.example.com) allowed to frame the view; empty allows any.
expires_in_daysinteger
Lifetime in days (default 7, at most 90).
never_expiresboolean
No expiry at all; needs the org setting permanent_shares (403 otherwise).
optionsobject
Display options of the public view and embed.
Show child parameters
hide_brandingboolean
Leave out the Lucida branding.
hide_legendboolean
Leave out chart legends.
lock_filtersobject
Property group ({"and": [...]}, may hold a cohort filter) ANDed into every query the public view runs; viewers cannot remove it.
show_queriesboolean
Notebooks only: show the text of query blocks (hidden by default, queries can name people).
show_recordingsboolean
Notebooks only, project admins only (G146): replay and playlist blocks play in the shared view (masked at capture, no person ids, no comments). Withheld by default.
show_rowsboolean
Notebooks only, project admins only (G146): people, event, group and cohort lists share their rows (the block's chosen property columns; identities and email-like columns are always dropped) instead of per-day counts. Off by default.
themestring
light, dark or system (the default).
viewer_filtersboolean
Viewers may add their own event, person or session property filters (?filters=), applied on top of the lock.
passwordstring
Viewers must enter this password (8 to 200 characters); stored only as an argon2id hash.
{
  "allowed_origins": [
    "string"
  ],
  "expires_in_days": 0,
  "never_expires": true,
  "options": {
    "hide_branding": true,
    "hide_legend": true,
    "lock_filters": {},
    "show_queries": true,
    "show_recordings": true,
    "show_rows": true,
    "theme": "string",
    "viewer_filters": true
  },
  "password": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/notebooks/{id}/shares" \
  -H "Content-Type: application/json" \
  -d '{"allowed_origins":["string"],"expires_in_days":0,"never_expires":true,"options":{"hide_branding":true,"hide_legend":true,"lock_filters":{},"show_queries":true,"show_recordings":true,"show_rows":true,"theme":"string","viewer_filters":true},"password":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404

Updated