actions

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-actions"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/0e137120-01b5-4f2f-8079-b5a710b415fa/social-card.svg?v=3e7ae33eec8b" alt="actions" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/actionsScope action:read

Parameters

project_idstringpathrequired
limitintegerquery
qstringquery
cursorstringquery

Code samples

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

Responses

200 Page of ActionDef, by name
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "id": "string",
      "name": "string",
      "steps": [
        {}
      ],
      "updated_at": "2024-01-01T00:00:00Z",
      "webhook_endpoint_id": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataActionDef[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
stepsobject[]required
Array of {event, filters?}; the action matches when any step does.
updated_atstringrequired
webhook_endpoint_idstring
Webhook endpoint notified when an ingested event matches (LC-ANA-149).
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/actionsScope action:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
stepsobject[]required
Array of steps, e.g. {"event": "$autocapture", "selector": "button.buy", "text": "Buy", "text_match": "contains"}; the action matches when any step does. Help page cohorts-actions-api.
webhook_endpoint_idstring
Webhook endpoint to notify when an ingested event matches this action.
{
  "description": "string",
  "name": "string",
  "steps": [
    {}
  ],
  "webhook_endpoint_id": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/actions" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","steps":[{}],"webhook_endpoint_id":"string"}'
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",
  "steps": [
    {}
  ],
  "updated_at": "2024-01-01T00:00:00Z",
  "webhook_endpoint_id": "string"
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
stepsobject[]required
Array of {event, filters?}; the action matches when any step does.
updated_atstringrequired
webhook_endpoint_idstring
Webhook endpoint notified when an ingested event matches (LC-ANA-149).
400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/actions/{id}Scope action:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

404
DELETEhttps://lucidace.com/v1/projects/{project_id}/actions/{id}Scope action:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
403
404
PATCHhttps://lucidace.com/v1/projects/{project_id}/actions/{id}Scope action:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
clear_webhookboolean
descriptionstring
namestring
stepsarray
webhook_endpoint_idstring
A webhook endpoint id sets it; clear_webhook: true removes it.
{
  "clear_webhook": true,
  "description": "string",
  "name": "string",
  "steps": [
    {}
  ],
  "webhook_endpoint_id": "string"
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/actions/{id}" \
  -H "Content-Type: application/json" \
  -d '{"clear_webhook":true,"description":"string","name":"string","steps":[{}],"webhook_endpoint_id":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/actions/{id}/screenshotScope action:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 the element screenshot
404
PUThttps://lucidace.com/v1/projects/{project_id}/actions/{id}/screenshotScope action:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

image/png
[
  0
]

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/actions/{id}/screenshot" \
  -H "Content-Type: image/png" \
  -d '[0]'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400 not a PNG
404
413
DELETEhttps://lucidace.com/v1/projects/{project_id}/actions/{id}/screenshotScope action:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
404
GEThttps://lucidace.com/v1/projects/{project_id}/smart-eventsScope insight:read

Parameters

project_idstringpathrequired

Code samples

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

Responses

200 Page of {kind, name, description, count, steps}, busiest first; kinds whose action name already exists are omitted. Single page (next_cursor is always null).
404
503
Updated