customer-analytics

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-customer-analytics"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/05c9ea55-7ba1-4278-b43c-25f4631b1402/social-card.svg?v=3e7ae33eec8b" alt="customer-analytics" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/customer-analytics/configScope insight:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-analytics/config"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "events": {},
  "group_type_index": 0,
  "mode": "string",
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
eventsobjectrequired
group_type_indexinteger
modestringrequired
updated_atstring
404
PUThttps://lucidace.com/v1/projects/{project_id}/customer-analytics/configScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
eventsobjectrequired
Any of activity | signup_pageview | signup | subscription | payment, each {source: {type: "event", name} | {type: "action", id}, filters?}.
group_type_indexinteger
Group type (0 to 4); required for b2b.
modestring
b2c (default) or b2b.
{
  "events": {},
  "group_type_index": 0,
  "mode": "string"
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/customer-analytics/config" \
  -H "Content-Type: application/json" \
  -d '{"events":{},"group_type_index":0,"mode":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/customer-analytics/dashboardScope insight:read

Parameters

project_idstringpathrequired
daysintegerquery
modestringquery
group_type_indexintegerquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-analytics/dashboard"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "days": 0,
  "group_type_index": 0,
  "mode": "string",
  "tiles": [
    {
      "config": {},
      "dashboard_id": "string",
      "id": "string",
      "ignore_dashboard_filters": true,
      "insight_id": "string",
      "kind": "string",
      "layout": {},
      "overrides": {},
      "position": 0,
      "text_body": "string"
    }
  ]
}
Schema
daysintegerrequired
group_type_indexinteger
modestringrequired
tilesTile[]required
Run each tile's query through POST /query.
Show child parameters
configobjectrequired
Button ({label, url, ...}) and widget ({widget, ...}) settings.
dashboard_idstringrequired
idstringrequired
ignore_dashboard_filtersbooleanrequired
The tile ignores the dashboard's date range and filters.
insight_idstring
kindstringrequired
insight, text, button or widget.
layoutobjectrequired
overridesobjectrequired
Tile-level overrides, merged over the dashboard's: {date_range?, interval?, breakdown?, filters?, filter_test_accounts?}.
positionintegerrequired
text_bodystring
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/customer-analytics/suggest-eventScope insight:read

Parameters

project_idstringpathrequired
rolestringqueryrequired
aibooleanquery
also have the assistant pick

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-analytics/suggest-event?role=<role>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "answer": "string",
  "ask_path": "string",
  "candidates": [
    {
      "name": "string",
      "volume_30d": 0
    }
  ],
  "prompt": "string",
  "role": "string"
}
Schema
answerstring
The assistant's pick and reason, written through the organization's AI provider; only with ai=true (a project with no provider connected gets the 409 "connect an AI provider").
ask_pathstringrequired
Web path that opens the ask agent with prompt.
candidatesCandidate[]required
Show child parameters
namestringrequired
volume_30dintegerrequired
promptstringrequired
Prefilled question for the ask agent.
rolestringrequired
400
404
409 ai=true and no AI provider connected
503
GEThttps://lucidace.com/v1/projects/{project_id}/customer-journeysScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

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

Responses

200 Page of JourneyRow, newest first
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "id": "string",
      "name": "string",
      "origin": "string",
      "steps": [
        {}
      ],
      "updated_at": "2024-01-01T00:00:00Z",
      "window_days": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataJourneyRow[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
originstringrequired
template | funnel | scratch
stepsobject[]required
[{label, source: {type, name|id}, filters?, optional}]
updated_atstringrequired
window_daysintegerrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeysScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
stepsStep[]required
[{label, source: {type: event|action, name|id}, filters?, optional?}], the first required.
Show child parameters
filtersobject
labelstringrequired
optionalboolean
sourceobjectrequired
{type: "event", name} or {type: "action", id}.
window_daysinteger
Conversion window in days (default 14).
{
  "description": "string",
  "name": "string",
  "steps": [
    {
      "filters": {},
      "label": "string",
      "optional": true,
      "source": {}
    }
  ],
  "window_days": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","steps":[{"filters":{},"label":"string","optional":true,"source":{}}],"window_days":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "id": "string",
  "name": "string",
  "origin": "string",
  "steps": [
    {}
  ],
  "updated_at": "2024-01-01T00:00:00Z",
  "window_days": 0
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
originstringrequired
template | funnel | scratch
stepsobject[]required
[{label, source: {type, name|id}, filters?, optional}]
updated_atstringrequired
window_daysintegerrequired
400
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/from-funnelScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
insight_idstringrequired
A saved funnel insight; its steps are copied, not linked.
namestring
{
  "insight_id": "string",
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/from-funnel" \
  -H "Content-Type: application/json" \
  -d '{"insight_id":"string","name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/templatesScope insight:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-journeys/templates"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {data: Template[]}
404
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/templatesScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
namestring
Defaults to the template name.
templatestringrequired
signup_conversion or free_to_paid.
{
  "name": "string",
  "template": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/templates" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","template":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}Scope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

404

Updated