On this page
Sommatic Docs
Open portal

Execution Beta

Run workflows, follow progress over SSE and read instances, results and node executions.

View as Markdown
Open in

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_id string Required
flow_definition_id string

Draft flow definition ID (for testing)

flow_version_id string

Published flow version ID (for production)

input object

Input data for the workflow

Responses

  • 200 Workflow 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>"
  }'
Response 200
{
  "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

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include flow instance results of a specific status.

exclude_status string query

Optional status parameter to exclude flow instance results of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

hydrate boolean 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

  • 200 OK.
  • 500 Something 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"
Response
{
  "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
    }
  }
}

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

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include node executions of a specific status.

exclude_status string query

Optional status parameter to exclude node executions of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something 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"
Response
{
  "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"
  }
}

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

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include flow instances of a specific status.

exclude_status string query

Optional status parameter to exclude flow instances of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something 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"
Response
{
  "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"
  }
}

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_id string query Required

The ID of the workflow to listen for execution events.

user_identity string query Required

The identity of the user listening for events.

Responses

  • 200 SSE 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" \
  -N

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs