Workflows
REST endpoints for workflows. Bearer-auth required.
GET /api/workflows
List workflows.
Query parameters
limit(optional): Page size (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).filter(optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.orderBy(optional): Multi-key sort (<Entity>OrderBy[]): array of{ field: direction }applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.workspace_id(optional): Filter to workflows in this workspace. When omitted, returns workflows across every workspace the caller is a member of (admins see all).include_deleted(optional): Soft-deleted workflow visibility.false(default) — active rows only.true— active plus soft-deleted.only— soft-deleted only (trash view).name(optional): Case-insensitive substring match on name.source(optional): Narrow by source.workspace= this workspace's rows plus those visible via installed integrations;integration= only rows made visible by installed integrations; omit = union.entry_node_id(optional): Shorthand: filter whereentryNodeIdequals this value.output_node_id(optional): Shorthand: filter whereoutputNodeIdequals this value.created_by(optional): Shorthand: filter wherecreatedByequals this value.runtime_user_id(optional): Shorthand: filter whereruntimeUserIdequals this value.retention_tier(optional): Shorthand: filter whereretentionTierequals this value.
Response
JSON
{
"data": [
{
"id": "<...>",
"workspaceId": "<...>",
"name": "<...>",
"description": "<...>",
"entryNodeId": "<...>",
"outputNodeId": "<...>",
"inputSchema?": "<...>",
"outputSchema?": "<...>",
"createdBy": "<...>",
"runtimeUserId": "<...>",
"deletedAt": "<...>",
"retentionTier": "<...>",
"createdAt": "<...>",
"updatedAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}POST /api/workflows
Create workflow
Request body
JSON
{
"workspaceId": "string",
"name": "string",
"description?": "string",
"inputSchema?": {},
"outputSchema?": {}
}Response
JSON
{
"id": "string",
"workspaceId": "string",
"name": "string",
"description": "string",
"entryNodeId": "string",
"outputNodeId": "string",
"inputSchema?": "any",
"outputSchema?": "any",
"createdBy": "string",
"runtimeUserId": "string",
"deletedAt": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}GET /api/workflows/{id}
Get a workflow by ID.
Path parameters
id(required): Workflow to retrieve.
Response
JSON
{
"id": "string",
"workspaceId": "string",
"name": "string",
"description": "string",
"entryNodeId": "string",
"outputNodeId": "string",
"inputSchema?": "any",
"outputSchema?": "any",
"createdBy": "string",
"runtimeUserId": "string",
"deletedAt": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}PATCH /api/workflows/{id}
Update workflow
Path parameters
id(required): The workflow's prefixed ID.
Request body
JSON
{
"name?": "string",
"description?": "string",
"entryNodeId?": "string",
"outputNodeId?": "string",
"inputSchema?": {},
"outputSchema?": {},
"runtimeUserId?": "string"
}Response
JSON
{
"id": "string",
"workspaceId": "string",
"name": "string",
"description": "string",
"entryNodeId": "string",
"outputNodeId": "string",
"inputSchema?": "any",
"outputSchema?": "any",
"createdBy": "string",
"runtimeUserId": "string",
"deletedAt": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}DELETE /api/workflows/{id}
Soft-delete a workflow.
Path parameters
id(required): Workflow to soft-delete.
Response
JSON
{
"success": "boolean"
}PUT /api/workflows/{id}/graph
Sync workflow graph (bulk replace nodes and edges)
Path parameters
id(required): The workflow's prefixed ID.
Request body
JSON
{
"nodes?": [
{
"type": "<...>",
"name": "<...>",
"config?": "<...>"
}
],
"edges?": [
{
"sourceNodeIndex": "<...>",
"targetNodeIndex": "<...>",
"handle?": "<...>",
"priority?": "<...>",
"label?": "<...>"
}
],
"entryNodeIndex?": "number"
}Response
JSON
{
"nodes": [
{
"id": "string",
"type": "agent | function | swarm | workflow",
"name": "string"
}
],
"edges": [
{
"id": "string",
"sourceNodeId": "string",
"targetNodeId": "string"
}
]
}DELETE /api/workflows/{id}/purge
Permanently delete a soft-deleted workflow.
Path parameters
id(required): Soft-deleted workflow to permanently delete.
Response
JSON
{
"success": "boolean"
}POST /api/workflows/{id}/restore
Restore a soft-deleted workflow.
Path parameters
id(required): Soft-deleted workflow to restore.
Response
JSON
{
"id": "string",
"workspaceId": "string",
"name": "string",
"description": "string",
"entryNodeId": "string",
"outputNodeId": "string",
"inputSchema?": "any",
"outputSchema?": "any",
"createdBy": "string",
"runtimeUserId": "string",
"deletedAt": "string",
"retentionTier": "any",
"createdAt": "string",
"updatedAt": "string"
}