interventions
GET
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions Parameters
project_idstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of InterventionRow, newest first
404
POST
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions Parameters
project_idstringpathrequiredRequest body
application/json
action_idstringFire on events matching this action instead of (or as well as)
steps.cap_per_userintegerFires per distinct id per window, 1 to 1000 (default 1).
cap_window_secsintegerThe cap window, 60 seconds to 30 days (default 1 day).
cooldown_secsintegerMinimum gap between two fires for one person, 0 to 30 days (default 0).
deliver_sdkbooleandeliver_webhookbooleandescriptionstringenabledbooleannamestringrequiredpayloadobjectJSON object handed to the SDK callback and the webhook (at most 8 KB). Event data is never copied in.
stepsobject[]ActionStep array, like an action's steps (event, url, selector, event and person property filters); any step matches. Up to 20. Leave empty when
action_id triggers.ttl_secsintegerHow long a fire stays deliverable to an SDK that connects after it, 10 seconds to 1 day (default 300).
{
"action_id": "string",
"cap_per_user": 0,
"cap_window_secs": 0,
"cooldown_secs": 0,
"deliver_sdk": true,
"deliver_webhook": true,
"description": "string",
"enabled": true,
"name": "string",
"payload": {},
"steps": [
{}
],
"ttl_secs": 0
}Code samples
cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions" \
-H "Content-Type: application/json" \
-d '{"action_id":"string","cap_per_user":0,"cap_window_secs":0,"cooldown_secs":0,"deliver_sdk":true,"deliver_webhook":true,"description":"string","enabled":true,"name":"string","payload":{},"steps":[{}],"ttl_secs":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"action_id": "string",
"cap_per_user": 0,
"cap_window_secs": 0,
"cooldown_secs": 0,
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"deliver_sdk": true,
"deliver_webhook": true,
"description": "string",
"enabled": true,
"fires_24h": 0,
"id": "string",
"name": "string",
"payload": {},
"steps": [
{}
],
"ttl_secs": 0,
"updated_at": "2024-01-01T00:00:00Z"
}Schema
action_idstringcap_per_userintegerrequiredcap_window_secsintegerrequiredcooldown_secsintegerrequiredcreated_atstringrequiredcreated_bystringdeliver_sdkbooleanrequireddeliver_webhookbooleanrequireddescriptionstringrequiredenabledbooleanrequiredfires_24hintegerrequiredFires in the last 24 hours.
idstringrequirednamestringrequiredpayloadobjectrequiredHanded to the SDK callback and the webhook as is.
stepsobject[]requiredactions.steps ActionStep array (any step matches); empty when action_id triggers.ttl_secsintegerrequiredupdated_atstringrequired400
403
404
409
GET
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions/fires Recent fires (35 days are kept), newest first; the cursor is the last fire's sequence number.
Parameters
project_idstringpathrequiredintervention_idstringquerydistinct_idstringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions/fires"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of FireRow
404
GET
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions/{id} Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions/{id}"TypeScript
Python
Go
PHP
Ruby
Java
PUT
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions/{id} Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
action_idstringFire on events matching this action instead of (or as well as)
steps.cap_per_userintegerFires per distinct id per window, 1 to 1000 (default 1).
cap_window_secsintegerThe cap window, 60 seconds to 30 days (default 1 day).
cooldown_secsintegerMinimum gap between two fires for one person, 0 to 30 days (default 0).
deliver_sdkbooleandeliver_webhookbooleandescriptionstringenabledbooleannamestringrequiredpayloadobjectJSON object handed to the SDK callback and the webhook (at most 8 KB). Event data is never copied in.
stepsobject[]ActionStep array, like an action's steps (event, url, selector, event and person property filters); any step matches. Up to 20. Leave empty when
action_id triggers.ttl_secsintegerHow long a fire stays deliverable to an SDK that connects after it, 10 seconds to 1 day (default 300).
{
"action_id": "string",
"cap_per_user": 0,
"cap_window_secs": 0,
"cooldown_secs": 0,
"deliver_sdk": true,
"deliver_webhook": true,
"description": "string",
"enabled": true,
"name": "string",
"payload": {},
"steps": [
{}
],
"ttl_secs": 0
}Code samples
cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions/{id}" \
-H "Content-Type: application/json" \
-d '{"action_id":"string","cap_per_user":0,"cap_window_secs":0,"cooldown_secs":0,"deliver_sdk":true,"deliver_webhook":true,"description":"string","enabled":true,"name":"string","payload":{},"steps":[{}],"ttl_secs":0}'TypeScript
Python
Go
PHP
Ruby
Java
DELETE
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions/{id} Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
POST
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/interventions/{id}/test Fire the intervention for one person now, skipping its trigger and caps (QA). It is delivered like a real fire: to the person's connected SDK and, when on, the webhook.
Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
distinct_idstringrequiredThe person the test fire goes to (their connected SDK shows it).
{
"distinct_id": "string"
}Code samples
cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/interventions/{id}/test" \
-H "Content-Type: application/json" \
-d '{"distinct_id":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"deliver_sdk": true,
"distinct_id": "string",
"event": "string",
"event_uuid": "string",
"expires_at": "2024-01-01T00:00:00Z",
"fired_at": "2024-01-01T00:00:00Z",
"id": "string",
"intervention_id": "string",
"seq": 0,
"webhook_state": "string"
}Schema
deliver_sdkbooleanrequireddistinct_idstringrequiredeventstringrequiredevent_uuidstringrequiredexpires_atstringrequiredfired_atstringrequiredidstringrequiredintervention_idstringrequiredseqintegerrequiredwebhook_statestringrequirednone, pending (webhook not queued yet) or queued.400
403
404
Updated