subscriptions
GET
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions Parameters
project_idstringpathrequiredtabstringqueryqstringquerychannelstringquerycreatorstringquerysortstringquerydirstringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of Subscription
400
404
POST
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions Parameters
project_idstringpathrequiredRequest body
application/json
ai_summarybooleanInsight and dashboard subscriptions: an AI summary above the tables. Delivery goes out without it when no model is configured. Not for
format: pdf.channelstringrequiredemail | slackcronstringFive-field cron in UTC, e.g.
0 9 * * 1; runs at most hourly. Give cron or schedule.dashboard_idstringdigestbooleanformatstringtable (default) or pdf: a dashboard subscription attaches the rendered PDF to the email (Slack gets the message and link only). pdf needs channel: email.insight_idstringExactly one of
insight_id, dashboard_id, digest: true, web_report: true or prompt.insight_idsarrayDashboard subscriptions: the insights to send, in order (1 to 20, default the first 20).
messagestringOptional personal message shown above the report (at most 1000 characters).
promptstringPrompt subscription: a natural-language question the assistant answers at each delivery (at most 2000 characters). Needs
prompt_window_days.prompt_window_daysintegerPrompt subscription: the analysis window in days (1 to 365, e.g. 7 or 30) the prompt is asked over.
recipientsarrayEmail: up to 20 addresses; each newly added one gets a notice mail.
scheduleobjectStructured schedule:
{"every": 2, "unit": "day|week|month", "time": "09:00", "timezone"?: "Europe/Berlin" (default: the project's), "weekdays"?: [1, 5], "monthly"?: {"date": 15} | {"ordinal": {"which": "first|second|third|fourth|last", "day": "mon..sun|any|weekday"}}}.slack_channelobjectSlack channel picked from the installed app (
GET .../subscriptions/slack-channels).targetstringSlack: the incoming-webhook URL (stored sealed). Email: a single address (or use
recipients).titlestringvariablesobjectDashboard variable values for a PDF, a JSON object of strings.
web_reportbooleanThe project's web analytics report: last 7 days against the 7 before, with top pages, referrers, channels, countries and devices.
{
"ai_summary": true,
"channel": "string",
"cron": "string",
"dashboard_id": "string",
"digest": true,
"format": "string",
"insight_id": "string",
"insight_ids": [
"string"
],
"message": "string",
"prompt": "string",
"prompt_window_days": 0,
"recipients": [
"string"
],
"schedule": {},
"slack_channel": {},
"target": "string",
"title": "string",
"variables": {},
"web_report": true
}Code samples
cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions" \
-H "Content-Type: application/json" \
-d '{"ai_summary":true,"channel":"string","cron":"string","dashboard_id":"string","digest":true,"format":"string","insight_id":"string","insight_ids":["string"],"message":"string","prompt":"string","prompt_window_days":0,"recipients":["string"],"schedule":{},"slack_channel":{},"target":"string","title":"string","variables":{},"web_report":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"ai_summary": true,
"channel": "string",
"consecutive_failures": 0,
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"creator": "string",
"cron": "string",
"dashboard_id": "string",
"digest": true,
"disabled_at": "2024-01-01T00:00:00Z",
"disabled_reason": "string",
"enabled": true,
"format": "string",
"id": "string",
"insight_id": "string",
"insight_ids": [
"string"
],
"last_run_at": "2024-01-01T00:00:00Z",
"message": "string",
"next_run_at": "2024-01-01T00:00:00Z",
"project_id": "string",
"prompt": "string",
"prompt_window_days": 0,
"schedule": {},
"slack_channel": {},
"target": "string",
"title": "string",
"variables": {},
"web_report": true
}Schema
ai_summarybooleanrequiredAn AI summary of the tables is placed above them (insight and dashboard subscriptions).
channelstringrequiredemail | slack | teams | discordconsecutive_failuresintegerrequiredFailed runs in a row; reset by a delivery, switches the subscription off at the cut-off.
created_atstringrequiredcreated_bystringWhose access the run renders with; a PDF run needs it.
creatorstringEmail of the creator.
cronstringFive-field cron, UTC.
dashboard_idstringdigestbooleanrequiredThe weekly recommendations digest instead of an insight or dashboard.
disabled_atstringdisabled_reasonstringWhy delivery was switched off by a permanent failure;
None for a manual pause.enabledbooleanrequiredformatstringrequiredtable (inline) or pdf (dashboard subscriptions: the rendered PDF as an attachment).idstringrequiredinsight_idstringinsight_idsarrayDashboard subscriptions: the insights sent, in order (at most 20);
None is the first 20.last_run_atstringmessagestringrequiredOptional personal message shown above the report.
next_run_atstringrequiredproject_idstringrequiredpromptstringPrompt subscription: the natural-language question answered at delivery time.
prompt_window_daysintegerPrompt subscription: the analysis window in days the prompt is asked over.
scheduleobjectStructured schedule (
Schedule JSON) instead of cron.slack_channelobjectSlack channel picked from the installed app:
{connector_id, id, name}.targetstringrequiredEmail address, or the sealed Slack webhook URL (serialised as empty).
titlestringrequiredvariablesobjectrequiredDashboard variable values the PDF is rendered with (name to string).
web_reportbooleanrequiredThe project's web analytics report (last 7 days against the 7 before).
400
403
404
POST
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions/schedule-preview Parameters
project_idstringpathrequiredRequest body
application/json
countintegerHow many upcoming deliveries (1 to 5, default 3).
cronstringscheduleobject{
"count": 0,
"cron": "string",
"schedule": {}
}Code samples
cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions/schedule-preview" \
-H "Content-Type: application/json" \
-d '{"count":0,"cron":"string","schedule":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"next": [
"2024-01-01T00:00:00Z"
]
}Schema
nextstring[]required400
404
GET
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions/slack-channels Parameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions/slack-channels"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Channels of the installed Slack workspace: {data, connector_id}
404 Slack app not installed
502
DELETE
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions/{id} Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
PATCH
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions/{id} Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
ai_summarybooleancronstringenabledbooleanPause (
false) or resume (true). Resuming resets the next delivery date; resuming one that was switched off by a permanent failure first sends a confirmation delivery and answers 409 while that still fails.insight_idsarrayDashboard insight subset;
null goes back to the first 20.messagestringpromptstringPrompt subscriptions only.
prompt_window_daysintegerrecipientsarrayscheduleobjectslack_channelobjecttitlestring{
"ai_summary": true,
"cron": "string",
"enabled": true,
"insight_ids": [
"string"
],
"message": "string",
"prompt": "string",
"prompt_window_days": 0,
"recipients": [
"string"
],
"schedule": {},
"slack_channel": {},
"title": "string"
}Code samples
cURL
curl -X PATCH "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions/{id}" \
-H "Content-Type: application/json" \
-d '{"ai_summary":true,"cron":"string","enabled":true,"insight_ids":["string"],"message":"string","prompt":"string","prompt_window_days":0,"recipients":["string"],"schedule":{},"slack_channel":{},"title":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
POST
https://lucida.15-204-158-166.sslip.io /v1/projects/{project_id}/subscriptions/{id}/test Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/subscriptions/{id}/test"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204 Delivered now; the schedule is untouched
404
409 Switched off by a failure
502 Delivery failed
Updated