Flows API
Create, update, and execute automation flows. Manage flow configurations and view execution history.
Endpoints
/api/v1/flow/createCreate a new automation flow
Parameters
name | stringrequired | Name for the new automation flow |
description | string | 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"
}'/api/v1/flow/listList 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 '{}'/api/v1/flow/getAvailableNodesGet available node types for building flows. Use type filter to reduce response size.
Parameters
type | string | Filter by node type |
category | string | Filter utilities/tools by category |
mcpServerId | string | Filter tools by specific MCP server |
search | string | Search by name or description |
limit | number | Max items for tools (default 50) |
offset | number | 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"
}'/api/v1/flow/getByIdGet flow details with nodes and edges
Parameters
id | stringrequired | 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"
}'/api/v1/flow/updateUpdate flow configuration. Only provided fields are updated.
Parameters
id | stringrequired | Flow ID from list |
name | string | New name for the flow |
description | string | New description |
nodes | array | Array of flow nodes |
edges | array | Array of flow edges connecting nodes |
triggerType | string | Trigger type: "manual", "webhook", "schedule", "table" |
isActive | boolean | Whether the flow is active |
usedSequenceNumbers | array | 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"
}'/api/v1/flow/updateNodeConfigUpdate configuration for a single node
Parameters
flowId | stringrequired | Flow ID |
nodeId | stringrequired | Node ID within the flow |
config | objectrequired | 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": {}
}'/api/v1/flow/deletePermanently delete a flow
Parameters
id | stringrequired | 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"
}'/api/v1/flow/createWebhookCreate a webhook trigger for a flow
Parameters
flowId | stringrequired | Flow ID |
triggerId | stringrequired | 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"
}'/api/v1/flow/getWebhookGet webhook details for a trigger
Parameters
triggerId | stringrequired | 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"
}'/api/v1/flow/deleteWebhookDelete a webhook trigger
Parameters
triggerId | stringrequired | 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"
}'/api/v1/flow/createScheduleCreate a schedule trigger for a flow
Parameters
flowId | stringrequired | Flow ID |
triggerId | stringrequired | Trigger node ID |
cronExpression | stringrequired | Cron expression (5 parts): minute hour day month weekday. Example: "0 9 * * *" for 9am daily |
timezone | string | 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"
}'/api/v1/flow/getScheduleGet schedule details
Parameters
triggerId | stringrequired | 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"
}'/api/v1/flow/updateScheduleUpdate a schedule trigger configuration
Parameters
triggerId | stringrequired | Trigger node ID |
cronExpression | stringrequired | Cron expression (5 parts): minute hour day month weekday |
timezone | stringrequired | 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"
}'/api/v1/flow/deleteScheduleDelete a schedule trigger
Parameters
triggerId | stringrequired | 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"
}'/api/v1/flow/getExecutionsGet execution history for a flow with pagination
Parameters
flowId | stringrequired | Flow ID |
limit | number | Max results (1-50, default 10) |
cursor | string | 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"
}'/api/v1/flow/getExecutionDetailsGet full execution details with node results and flow snapshot
Parameters
executionId | stringrequired | Execution ID from getExecutions |
includeFullData | boolean | 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
}'/api/v1/flow/getActiveExecutionGet the most recent running execution for a flow
Parameters
flowId | stringrequired | 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"
}'/api/v1/flow/getActiveExecutionsGet all currently running executions for a flow
Parameters
flowId | stringrequired | 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"
}'/api/v1/flow/getSnapshotsGet flow version history (snapshots). Each save creates a snapshot for rollback.
Parameters
flowId | stringrequired | Flow ID |
cursor | string | Pagination cursor |
limit | number | 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
}'/api/v1/flow/deleteSnapshotDelete a snapshot (cannot delete the latest snapshot)
Parameters
snapshotId | stringrequired | 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"
}'/api/v1/flow/restoreFromSnapshotByIdRestore flow nodes and edges from a previous snapshot
Parameters
flowId | stringrequired | Flow ID |
snapshotId | stringrequired | 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"
}'/api/v1/flow/stopExecutionStop a running execution
Parameters
executionId | stringrequired | 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"
}'/api/v1/flow/runManualFlowExecute a flow manually with optional trigger data
Parameters
flowId | stringrequired | Flow ID to execute |
triggerData | object | Data to pass to the trigger node |
triggerId | string | Specific trigger node ID (uses manual trigger if not specified) |
executionId | string | Custom execution ID (generated if not provided) |
executionMode | string | 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"
}'/api/v1/flow/pinNodeDataPin data to a node for testing. Pinned nodes use fixed output instead of executing.
Parameters
flowId | stringrequired | Flow ID |
nodeId | stringrequired | Node ID to pin data to |
input | any | Input data to pin |
output | any | 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": {}
}'/api/v1/flow/unpinNodeDataRemove pinned data from a node so it executes normally
Parameters
flowId | stringrequired | Flow ID |
nodeId | stringrequired | 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"
}'/api/v1/flow/toggleActiveToggle flow active/inactive. Inactive flows do not process webhook or schedule triggers.
Parameters
flowId | stringrequired | 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"
}'/api/v1/flow/enterListenModeEnter listen mode to capture incoming webhook/table events without executing the flow
Parameters
flowId | stringrequired | Flow ID |
triggerType | stringrequired | Type of trigger to listen for |
duration | number | 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
}'/api/v1/flow/exitListenModeExit listen mode and stop capturing events
Parameters
flowId | stringrequired | 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"
}'/api/v1/flow/getHelpGet help for Flows API. Call with topic to get focused guidance.
Parameters
topic | string | 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"
}'