persons

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-persons"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8acd2112-1079-438f-8d32-0eeb8a399af3/social-card.svg?v=3e7ae33eec8b" alt="persons" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/computed-traitsScope person:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

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

Responses

200 Page of ComputedTraitRow, newest first
Example
{
  "data": [
    {
      "aggregate": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "enabled": true,
      "entity": "string",
      "event": "string",
      "filters": [
        {}
      ],
      "group_type_index": 0,
      "id": "string",
      "last_entities": 0,
      "last_error": "string",
      "last_run_at": "2024-01-01T00:00:00Z",
      "last_status": "string",
      "last_written": 0,
      "math_property": "string",
      "name": "string",
      "property": "string",
      "updated_at": "2024-01-01T00:00:00Z",
      "window_days": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataComputedTraitRow[]required
Show child parameters
aggregatestringrequired
count, sum, last, most_frequent, first_seen or last_seen.
created_atstringrequired
created_bystring
descriptionstringrequired
enabledbooleanrequired
entitystringrequired
person or group.
eventstringrequired
filtersobject[]required
[{property, op, value}] event property conditions (all must hold).
group_type_indexinteger
idstringrequired
last_entitiesintegerrequired
last_errorstringrequired
last_run_atstring
last_statusstringrequired
never, ok or failed.
last_writtenintegerrequired
math_propertystring
namestringrequired
propertystringrequired
The person or group property the value is written to.
updated_atstringrequired
window_daysintegerrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/computed-traitsScope person:write

Parameters

project_idstringpathrequired

Request body

application/json
aggregatestringrequired
count, sum, last, most_frequent, first_seen or last_seen.
descriptionstring
enabledboolean
entitystringrequired
person or group.
eventstringrequired
filtersCond[]
Event property conditions, all must hold.
Show child parameters
opstringrequired
eq, neq, contains, is_set, is_not_set, gt or lt.
propertystringrequired
valueobject
group_type_indexinteger
Group type 0 to 4 (group traits only).
math_propertystring
The event property summed, or whose last or most frequent value is kept.
namestringrequired
propertystring
Property written on the profile (default trait_<slug of name>; never $lc_*).
window_daysinteger
Trailing window, 1 to 365 days (default 30).
{
  "aggregate": "string",
  "description": "string",
  "enabled": true,
  "entity": "string",
  "event": "string",
  "filters": [
    {
      "op": "string",
      "property": "string",
      "value": {}
    }
  ],
  "group_type_index": 0,
  "math_property": "string",
  "name": "string",
  "property": "string",
  "window_days": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/computed-traits" \
  -H "Content-Type: application/json" \
  -d '{"aggregate":"string","description":"string","enabled":true,"entity":"string","event":"string","filters":[{"op":"string","property":"string","value":{}}],"group_type_index":0,"math_property":"string","name":"string","property":"string","window_days":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "aggregate": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "enabled": true,
  "entity": "string",
  "event": "string",
  "filters": [
    {}
  ],
  "group_type_index": 0,
  "id": "string",
  "last_entities": 0,
  "last_error": "string",
  "last_run_at": "2024-01-01T00:00:00Z",
  "last_status": "string",
  "last_written": 0,
  "math_property": "string",
  "name": "string",
  "property": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "window_days": 0
}
Schema
aggregatestringrequired
count, sum, last, most_frequent, first_seen or last_seen.
created_atstringrequired
created_bystring
descriptionstringrequired
enabledbooleanrequired
entitystringrequired
person or group.
eventstringrequired
filtersobject[]required
[{property, op, value}] event property conditions (all must hold).
group_type_indexinteger
idstringrequired
last_entitiesintegerrequired
last_errorstringrequired
last_run_atstring
last_statusstringrequired
never, ok or failed.
last_writtenintegerrequired
math_propertystring
namestringrequired
propertystringrequired
The person or group property the value is written to.
updated_atstringrequired
window_daysintegerrequired
400
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/computed-traits/{id}Scope person:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

404
PUThttps://lucidace.com/v1/projects/{project_id}/computed-traits/{id}Scope person:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
aggregatestringrequired
count, sum, last, most_frequent, first_seen or last_seen.
descriptionstring
enabledboolean
entitystringrequired
person or group.
eventstringrequired
filtersCond[]
Event property conditions, all must hold.
Show child parameters
opstringrequired
eq, neq, contains, is_set, is_not_set, gt or lt.
propertystringrequired
valueobject
group_type_indexinteger
Group type 0 to 4 (group traits only).
math_propertystring
The event property summed, or whose last or most frequent value is kept.
namestringrequired
propertystring
Property written on the profile (default trait_<slug of name>; never $lc_*).
window_daysinteger
Trailing window, 1 to 365 days (default 30).
{
  "aggregate": "string",
  "description": "string",
  "enabled": true,
  "entity": "string",
  "event": "string",
  "filters": [
    {
      "op": "string",
      "property": "string",
      "value": {}
    }
  ],
  "group_type_index": 0,
  "math_property": "string",
  "name": "string",
  "property": "string",
  "window_days": 0
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}" \
  -H "Content-Type: application/json" \
  -d '{"aggregate":"string","description":"string","enabled":true,"entity":"string","event":"string","filters":[{"op":"string","property":"string","value":{}}],"group_type_index":0,"math_property":"string","name":"string","property":"string","window_days":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/computed-traits/{id}Scope person:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
404
POSThttps://lucidace.com/v1/projects/{project_id}/computed-traits/{id}/runScope person:read

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
dry_runboolean
Compute and compare only: nothing is written and the run is not recorded (default false).
{
  "dry_run": true
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}/run" \
  -H "Content-Type: application/json" \
  -d '{"dry_run":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "changed": 0,
  "dry_run": true,
  "entities": 0,
  "preview": [
    {
      "changed": true,
      "entity_key": "string",
      "value": {}
    }
  ],
  "written": 0
}
Schema
changedintegerrequired
Values that changed (written unless this was a dry run).
dry_runbooleanrequired
entitiesintegerrequired
Entities with a value in the window.
previewTraitPreview[]required
Show child parameters
changedbooleanrequired
Differs from the value last written (a run would write it).
entity_keystringrequired
valueobjectrequired
writtenintegerrequired
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/computed-traits/{id}/valuesScope person:read

Parameters

project_idstringpathrequired
idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

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

Responses

200 Page of TraitValue (last value written per person id or group key), by key
404

Updated