Back to API Overview

Flows API

Create, update, and execute automation flows. Manage flow configurations and view execution history.

29 endpoints

Endpoints

POST
/api/v1/flow/create

Create a new automation flow

Parameters

namestringrequired

Name for the new automation flow

descriptionstring

Optional description of the flow

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/create \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example",
  "description": "example"
}'
POST
/api/v1/flow/list

List all automation flows. Returns array with id, name, description, isActive, triggerType, nodes[], edges[].

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/list \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'
POST
/api/v1/flow/getAvailableNodes

Get available node types for building flows. Use type filter to reduce response size.

Parameters

typestring

Filter by node type

categorystring

Filter utilities/tools by category

mcpServerIdstring

Filter tools by specific MCP server

searchstring

Search by name or description

limitnumber

Max items for tools (default 50)

offsetnumber

Offset for tools pagination

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getAvailableNodes \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "example",
  "category": "example",
  "mcpServerId": "example"
}'
POST
/api/v1/flow/getById

Get flow details with nodes and edges

Parameters

idstringrequired

Flow ID from list

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getById \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/flow/update

Update flow configuration. Only provided fields are updated.

Parameters

idstringrequired

Flow ID from list

namestring

New name for the flow

descriptionstring

New description

nodesarray

Array of flow nodes

edgesarray

Array of flow edges connecting nodes

triggerTypestring

Trigger type: "manual", "webhook", "schedule", "table"

isActiveboolean

Whether the flow is active

usedSequenceNumbersarray

Used sequence numbers for node ordering

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/update \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "name": "example",
  "description": "example"
}'
POST
/api/v1/flow/updateNodeConfig

Update configuration for a single node

Parameters

flowIdstringrequired

Flow ID

nodeIdstringrequired

Node ID within the flow

configobjectrequired

Node configuration object

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/updateNodeConfig \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "nodeId": "example",
  "config": {}
}'
POST
/api/v1/flow/delete

Permanently delete a flow

Parameters

idstringrequired

Flow ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/delete \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/flow/createWebhook

Create a webhook trigger for a flow

Parameters

flowIdstringrequired

Flow ID

triggerIdstringrequired

Trigger node ID in the flow

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/createWebhook \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "triggerId": "example"
}'
POST
/api/v1/flow/getWebhook

Get webhook details for a trigger

Parameters

triggerIdstringrequired

Trigger node ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getWebhook \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "triggerId": "example"
}'
POST
/api/v1/flow/deleteWebhook

Delete a webhook trigger

Parameters

triggerIdstringrequired

Trigger node ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/deleteWebhook \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "triggerId": "example"
}'
POST
/api/v1/flow/createSchedule

Create a schedule trigger for a flow

Parameters

flowIdstringrequired

Flow ID

triggerIdstringrequired

Trigger node ID

cronExpressionstringrequired

Cron expression (5 parts): minute hour day month weekday. Example: "0 9 * * *" for 9am daily

timezonestring

Timezone (default: UTC). Example: "America/New_York"

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/createSchedule \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "triggerId": "example",
  "cronExpression": "example"
}'
POST
/api/v1/flow/getSchedule

Get schedule details

Parameters

triggerIdstringrequired

Trigger node ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getSchedule \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "triggerId": "example"
}'
POST
/api/v1/flow/updateSchedule

Update a schedule trigger configuration

Parameters

triggerIdstringrequired

Trigger node ID

cronExpressionstringrequired

Cron expression (5 parts): minute hour day month weekday

timezonestringrequired

Timezone. Example: "America/New_York", "UTC"

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/updateSchedule \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "triggerId": "example",
  "cronExpression": "example",
  "timezone": "example"
}'
POST
/api/v1/flow/deleteSchedule

Delete a schedule trigger

Parameters

triggerIdstringrequired

Trigger node ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/deleteSchedule \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "triggerId": "example"
}'
POST
/api/v1/flow/getExecutions

Get execution history for a flow with pagination

Parameters

flowIdstringrequired

Flow ID

limitnumber

Max results (1-50, default 10)

cursorstring

Pagination cursor from previous response

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getExecutions \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "limit": 0,
  "cursor": "example"
}'
POST
/api/v1/flow/getExecutionDetails

Get full execution details with node results and flow snapshot

Parameters

executionIdstringrequired

Execution ID from getExecutions

includeFullDataboolean

Include full node results (for copying data)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getExecutionDetails \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "executionId": "example",
  "includeFullData": true
}'
POST
/api/v1/flow/getActiveExecution

Get the most recent running execution for a flow

Parameters

flowIdstringrequired

Flow ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getActiveExecution \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example"
}'
POST
/api/v1/flow/getActiveExecutions

Get all currently running executions for a flow

Parameters

flowIdstringrequired

Flow ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getActiveExecutions \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example"
}'
POST
/api/v1/flow/getSnapshots

Get flow version history (snapshots). Each save creates a snapshot for rollback.

Parameters

flowIdstringrequired

Flow ID

cursorstring

Pagination cursor

limitnumber

Max results (1-50, default 20)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getSnapshots \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "cursor": "example",
  "limit": 0
}'
POST
/api/v1/flow/deleteSnapshot

Delete a snapshot (cannot delete the latest snapshot)

Parameters

snapshotIdstringrequired

Snapshot ID from getSnapshots

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/deleteSnapshot \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "snapshotId": "example"
}'
POST
/api/v1/flow/restoreFromSnapshotById

Restore flow nodes and edges from a previous snapshot

Parameters

flowIdstringrequired

Flow ID

snapshotIdstringrequired

Snapshot ID to restore from

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/restoreFromSnapshotById \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "snapshotId": "example"
}'
POST
/api/v1/flow/stopExecution

Stop a running execution

Parameters

executionIdstringrequired

Execution ID to stop

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/stopExecution \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "executionId": "example"
}'
POST
/api/v1/flow/runManualFlow

Execute a flow manually with optional trigger data

Parameters

flowIdstringrequired

Flow ID to execute

triggerDataobject

Data to pass to the trigger node

triggerIdstring

Specific trigger node ID (uses manual trigger if not specified)

executionIdstring

Custom execution ID (generated if not provided)

executionModestring

Execution mode: "test" uses pinned data, "live" runs normally

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/runManualFlow \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "triggerData": {},
  "triggerId": "example"
}'
POST
/api/v1/flow/pinNodeData

Pin data to a node for testing. Pinned nodes use fixed output instead of executing.

Parameters

flowIdstringrequired

Flow ID

nodeIdstringrequired

Node ID to pin data to

inputany

Input data to pin

outputany

Output data to pin - used as fixed output in test mode

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/pinNodeData \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "nodeId": "example",
  "input": {}
}'
POST
/api/v1/flow/unpinNodeData

Remove pinned data from a node so it executes normally

Parameters

flowIdstringrequired

Flow ID

nodeIdstringrequired

Node ID to unpin

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/unpinNodeData \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "nodeId": "example"
}'
POST
/api/v1/flow/toggleActive

Toggle flow active/inactive. Inactive flows do not process webhook or schedule triggers.

Parameters

flowIdstringrequired

Flow ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/toggleActive \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example"
}'
POST
/api/v1/flow/enterListenMode

Enter listen mode to capture incoming webhook/table events without executing the flow

Parameters

flowIdstringrequired

Flow ID

triggerTypestringrequired

Type of trigger to listen for

durationnumber

Listen duration in ms (default 5 minutes)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/enterListenMode \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example",
  "triggerType": "example",
  "duration": 0
}'
POST
/api/v1/flow/exitListenMode

Exit listen mode and stop capturing events

Parameters

flowIdstringrequired

Flow ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/exitListenMode \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "flowId": "example"
}'
POST
/api/v1/flow/getHelp

Get help for Flows API. Call with topic to get focused guidance.

Parameters

topicstring

Topic: "overview", "nodes", "triggers", "execution", "testing"

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/flow/getHelp \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "topic": "example"
}'
Flows API - Serenities