Execution Beta
Run workflows, follow progress over SSE and read instances, results and node executions.
Execute a full workflow
POST /workflow-orchestration/data-plane/execution-engine/execution/workflow
Resolves graph from a draft FlowDefinition or published FlowVersion, creates a FlowInstance, delegates execution to the orchestrator, and persists step results. Provide flow_definition_id for draft testing or flow_version_id for production.
Authentication: Bearer token
Request body
-
organization_idstring Required -
flow_definition_idstring -
Draft flow definition ID (for testing)
-
flow_version_idstring -
Published flow version ID (for production)
-
inputobject -
Input data for the workflow
Responses
-
200Workflow execution result
curl -X POST https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/execution/workflow \
-H "Authorization: Bearer $SOMMATIC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"organization_id": "<organization_id>"
}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/execution/workflow', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/execution/workflow",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Operation completed successfully",
"result": {
"organization_id": "<organization_id>"
}
}Get an flow instance result by query selector.
GET /workflow-orchestration/data-plane/execution-engine/flow-instance-result/{queryselector}
Returns the flow instance result information that matches the query selector an search specified in the route.
Authentication: Bearer token
Parameters
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include flow instance results of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude flow instance results of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
-
hydrateboolean query -
When "true", every `$payloadRef` descriptor found in the returned documents is resolved server-side and replaced by the original externalized content, so the consumer receives the same inline payloads it would have seen before the claim-check optimization. Use it for programmatic consumers that need the full content in one response (Command Center context, integrations). Leave it off for UI reads — the Run Detail screen loads externalized content lazily per chip. Ephemeral `_truncated` markers cannot be hydrated (their content was never stored).
Responses
-
200OK. -
500Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/flow-instance-result/id \
-H "Authorization: Bearer $SOMMATIC_TOKEN"const response = await fetch('https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/flow-instance-result/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/flow-instance-result/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Operation completed successfully",
"result": {
"organization_id": "org_blackwood_stone_2319",
"flow_instance_id": "inst_91827",
"flow_version_id": "flow-def-email-routing:v1.3.0",
"flow_slug": "flow.email_classify_and_route",
"status": {
"id": 5,
"name": "completed",
"title": "Completed",
"color": null
},
"started_at": 1735692000000,
"completed_at": 1735692002450,
"duration_ms": 2450,
"correlation_id": "corr_f0c9e3b1",
"trigger_id": "trig_email_ingress",
"outcome_label": "success_billing_ticket_created",
"outcome_category": "success",
"final_output_envelope": {
"payload": {
"ticket_id": "TCK-392818",
"category": "billing",
"customer_id": "customer-123",
"status": "created"
}
},
"error_summary": null,
"metrics": {
"node_count_total": 4,
"node_count_succeeded": 4,
"node_count_failed": 0,
"node_count_retried": 1,
"retry_count_total": 1,
"max_concurrent_nodes": 2
}
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}Get a node execution by query selector.
GET /workflow-orchestration/data-plane/execution-engine/node-execution/{queryselector}
Returns the node execution information that matches the query selector and search specified in the route.
Authentication: Bearer token
Parameters
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include node executions of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude node executions of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/node-execution/id \
-H "Authorization: Bearer $SOMMATIC_TOKEN"const response = await fetch('https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/node-execution/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/node-execution/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Operation completed successfully",
"result": {
"organization_id": "org_1234",
"flow_instance_id": "inst_91827",
"node_id": "classify_email",
"attempt_number": 2,
"status": "success",
"started_at": 1735692000000,
"ended_at": 1735692001423,
"input_envelope": {
"node_id": "trigger_email",
"payload": {
"subject": "Invoice overdue",
"body": "I have not received payment confirmation..."
}
},
"output_envelope": {
"node_id": "classify_email",
"payload": {
"category": "billing",
"confidence": 0.87
}
},
"selected_port": "out",
"execution_result": {
"ai_decision": {
"label": "billing",
"confidence": 0.87
}
},
"error_details": null,
"metrics": {
"latency_ms": 423,
"token_usage": {
"prompt_tokens": 1123,
"completion_tokens": 64
}
},
"worker_id": "worker-west-02"
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}Get an Flow Instance by query selector.
GET /workflow-orchestration/data-plane/instance-runtime/flow-instance/{queryselector}
Returns the Flow Instance information that matches the query selector an search specified in the route.
Authentication: Bearer token
Parameters
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include flow instances of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude flow instances of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/workflow-orchestration/data-plane/instance-runtime/flow-instance/id \
-H "Authorization: Bearer $SOMMATIC_TOKEN"const response = await fetch('https://api.sommatic.ai/workflow-orchestration/data-plane/instance-runtime/flow-instance/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/workflow-orchestration/data-plane/instance-runtime/flow-instance/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Operation completed successfully",
"result": {
"organization_id": "org_blackwood",
"flow_version_id": "flow-def-email-routing:v1.3.0",
"flow_slug": "flow.email_classify_and_route",
"status": "running",
"started_at": 1735689000000,
"completed_at": null,
"active_node_id": "classify_email",
"queued_node_ids": [
"create_ticket"
],
"variables": {
"email_subject": "Payment not received",
"email_body": "Hello, I have not received my invoice for December...",
"classification": {
"category": "billing",
"confidence": 0.92
}
},
"last_envelope": {
"node_id": "classify_email",
"payload": {
"category": "billing",
"confidence": 0.92
}
},
"pending_async_operations": [
{
"operation_key": "tool.openai_async_chat",
"status": "waiting-callback"
}
],
"linked_timer_ids": [
"timer_8ab233"
],
"execution_history_ids": [
"exec_123",
"exec_124"
],
"resume_strategy": "continue-node"
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}SSE stream for real-time workflow execution events
GET /workflow-orchestration/execution/stream
Opens a Server-Sent Events connection to receive real-time execution progress for a specific workflow and user.
Authentication: Bearer token
Parameters
-
flow_definition_idstring query Required -
The ID of the workflow to listen for execution events.
-
user_identitystring query Required -
The identity of the user listening for events.
Responses
-
200SSE stream opened successfully.
curl -X GET https://api.sommatic.ai/workflow-orchestration/execution/stream?flow_definition_id=<flow_definition_id>&user_identity=<user_identity> \
-H "Authorization: Bearer $SOMMATIC_TOKEN" \
-Nconst response = await fetch('https://api.sommatic.ai/workflow-orchestration/execution/stream?flow_definition_id=<flow_definition_id>&user_identity=<user_identity>', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/workflow-orchestration/execution/stream?flow_definition_id=<flow_definition_id>&user_identity=<user_identity>",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json()