Skip to main content
POST
/
workflows
/
v1
/
workflows
/
{workflow_id}
/
execute
Execute Workflow
curl --request POST \
  --url https://api-qa.interactly.ai/workflows/v1/workflows/{workflow_id}/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dynamic_variables": {},
  "runtime_variables": {},
  "miscellaneous": {},
  "command": "start",
  "workflow_id": "5eb7cf5a86d9755df3a6c593",
  "version_number": 0,
  "run_by": "<string>",
  "workflow_run_id": "5eb7cf5a86d9755df3a6c593",
  "team_id": "<string>",
  "thread_to_node_inputs": {}
}
'
{
  "logical_id": "<string>",
  "workflow_id": "<string>",
  "version_number": 0,
  "status": "not_started",
  "termination_source": "<string>",
  "input_output_pairs": [
    {
      "run_input": {
        "dynamic_variables": {},
        "runtime_variables": {},
        "miscellaneous": {},
        "command": "start",
        "workflow_id": "<string>",
        "version_number": 0,
        "run_by": "<string>",
        "workflow_run_id": "<string>",
        "team_id": "<string>",
        "thread_to_node_inputs": {}
      },
      "run_output": {
        "events": [
          "<unknown>"
        ],
        "thread_to_node_outputs": {}
      },
      "evaluation": {}
    }
  ],
  "run_by": "<string>",
  "comments": [
    {
      "logical_id": "<string>",
      "content": "<string>",
      "createdBy": "5eb7cf5a86d9755df3a6c593",
      "updatedBy": "5eb7cf5a86d9755df3a6c593",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "llm_token_usage": {
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "total_tokens": 0,
    "call_count_with_user_keys": 0,
    "call_count_with_fallback_keys": 0,
    "call_count": 0,
    "breakdown_by_models": [
      {
        "response_model": "<string>",
        "provider": "<string>",
        "total_input_tokens": 0,
        "total_output_tokens": 0,
        "total_tokens": 0,
        "call_count_with_user_keys": 0,
        "call_count_with_fallback_keys": 0,
        "call_count": 0
      }
    ]
  },
  "llm_latency_stats": {
    "call_count": 0,
    "total_latency_milliseconds": 0,
    "average_latency_milliseconds": 0,
    "breakdown_by_models": [
      {
        "response_model": "<string>",
        "provider": "<string>",
        "call_count": 0,
        "total_latency_milliseconds": 0,
        "average_latency_milliseconds": 0
      }
    ]
  },
  "version_name": "Initial Version",
  "workflow_config_fully_hydrated": {
    "workflow_config": {
      "logical_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "category": "User Created",
      "llms_config": {
        "logical_id": "llm_da2e5b0f-b9ac-48c6-84a3-3901c7bc9e2b",
        "provider": "default_provider",
        "streaming": false,
        "model_kwargs": {},
        "do_not_split_sentences": false,
        "type": "global_default_llm"
      },
      "main_response_config": {
        "prompt": "<string>"
      },
      "backchannel_response_config": {
        "prompt": "<string>"
      },
      "default_prompt_prefix": "<string>",
      "default_prompt_suffix": "<string>",
      "tools_config": {
        "tools": [
          {
            "logical_id": "<string>",
            "tool_id": "<string>",
            "name": "<string>",
            "description": "<string>",
            "category": "<string>",
            "signature": "<string>",
            "args_schema": {},
            "static_messages_config": {
              "static_messages": [
                "<string>"
              ],
              "static_messages_selection_mode": "random"
            },
            "result_runtime_variable_name": "tool_result",
            "type": "inline_python",
            "code": "<string>"
          }
        ]
      },
      "mcp_servers": [
        {
          "server_url": "<string>",
          "name": "<string>",
          "api_headers": {}
        }
      ],
      "global_condition_evaluation_method": "tool_call",
      "nodes": [
        "<string>"
      ],
      "edges": [
        "<string>"
      ],
      "evaluation_config": {
        "evaluator_workflow_id": "<string>",
        "evaluator_workflow_version_number": 123,
        "enable_turn_by_turn_evaluation": false
      },
      "miscellaneous": {}
    },
    "node_configs": [
      {
        "logical_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "workflow_id": "<string>",
        "version_number": 0,
        "disabled": false,
        "miscellaneous": {},
        "primary_category": "System",
        "secondary_category": "LLM",
        "is_start": false,
        "global_node_config": {
          "is_global": false,
          "condition": {
            "condition_freeform": "<string>",
            "condition_expression": "<string>",
            "args_schema": {},
            "static_messages_config": {
              "static_messages": [
                "<string>"
              ],
              "static_messages_selection_mode": "random"
            }
          }
        },
        "main_response_config": {
          "prompt": "<string>"
        },
        "llms_config": {
          "logical_id": "llm_424abb2b-48cd-4cbe-b994-cde847de2c24",
          "provider": "default_provider",
          "streaming": false,
          "model_kwargs": {},
          "do_not_split_sentences": false,
          "type": "global_default_llm"
        },
        "tools_config": {
          "tools": [
            {
              "logical_id": "<string>",
              "tool_id": "<string>",
              "name": "<string>",
              "description": "<string>",
              "category": "<string>",
              "signature": "<string>",
              "args_schema": {},
              "static_messages_config": {
                "static_messages": [
                  "<string>"
                ],
                "static_messages_selection_mode": "random"
              },
              "result_runtime_variable_name": "tool_result",
              "type": "inline_python",
              "code": "<string>"
            }
          ]
        },
        "self_loop": false,
        "wait_for_user_message": true,
        "max_consecutive_tool_calls": 1,
        "default_error_message": "I am sorry, there seems to be an issue. Could you please repeat?",
        "use_mcp_tools": false,
        "type": "worker_llm",
        "structured_output_schema": {},
        "backchannel_response_config": {
          "prompt": "<string>"
        }
      }
    ],
    "edge_configs": [
      {
        "logical_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "workflow_id": "<string>",
        "version_number": 0,
        "disabled": false,
        "miscellaneous": {},
        "source_node_logical_id": "<string>",
        "destination_node_logical_id": "<string>",
        "type": "direct"
      }
    ],
    "dynamic_variables": {},
    "runtime_variables": {}
  },
  "workflow_run_id": "<string>",
  "source_workflow_run_id": "<string>",
  "is_evaluation_run": false,
  "evaluation_run_info": {
    "evaluation_workflow_run_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Retrieve your API Key from Dashboard API Keys Section.

Path Parameters

workflow_id
string
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Query Parameters

version
integer | null

Version number to execute. If not provided, uses active version. Ignored for legacy workflows.

Required range: x >= 0

Body

application/json

Input to the workflow, used to kick off or resume a workflow run.

dynamic_variables
Dynamic Variables · object

Dynamic variable values that will replace the '{{...}}' placeholders in the prompts, condition strings, tool signatures, etc.

runtime_variables
Runtime Variables · object

Runtime variables that will replace the '[[...]]' placeholders in the prompts, condition strings, tool signatures, etc.

miscellaneous
Miscellaneous Run Input Data · object

Miscellaneous run-input data

command
enum<string>
default:start

Command to execute on the workflow or workflow run

Available options:
start,
data,
resume,
pause,
stop
workflow_id
string | null

DB Object ID of the workflow to run

Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

version_number
integer | null
default:0

Version number of the workflow this run is associated with. 0 is the initial version (default).

run_by
string | null

Identifier of the user or system that initiated the workflow run

workflow_run_id
string | null

ID of the workflow run to resume

Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

team_id
string | null

Team ID associated with this workflow run, used for vendor credential lookup

thread_to_node_inputs
Thread to Node Inputs · object

Mapping of thread IDs to node inputs

Response

Successful Response

Represents a workflow run, which is a specific execution of a workflow.

logical_id
string | null

Unique ID associated with this particular run of the workflow

workflow_id
string | null

ID of the workflow being run

version_number
integer | null
default:0

Version number of the workflow this run is associated with. 0 is the initial version (default).

status
enum<string>
default:not_started

Current status of the workflow run

Available options:
not_started,
started,
running,
failed,
completed,
paused,
waiting_for_user_input,
cancelled,
aborted_looping_risk
termination_source
string | null

Describes what caused the run to reach a terminal state (especially FAILED). None for normal completions. Well-known values: 'execution_error', 'stale_run_reaper', 'finally_safety_net'.

input_output_pairs
WorkflowRunInputOutputPair · object[]

List of input-output pairs. Each pair corresponds to each contiguous execution segment of the workflow

run_by
string | null

Identifier of the user or system that initiated the workflow run

comments
CommentConfig · object[]

List of comments associated with the workflow run

llm_token_usage
LLMTokenUsage · object

Token usage information for a workflow run, including total tokens and breakdown by model and provider.

llm_latency_stats
LLMLatencyStats · object

Latency statistics for a workflow run, including total calls, average latency, and breakdown by model.

version_name
string | null
default:Initial Version

Version name of the workflow this run is associated with

workflow_config_fully_hydrated
WorkflowConfigFullyHydrated · object

Fully hydrated workflow configuration at the time of execution

workflow_run_id
string | null

DB Object ID of this workflow run

source_workflow_run_id
string | null

For evaluation runs, this is the id of the original workflow run being evaluated. None for regular workflow runs.

is_evaluation_run
boolean
default:false

Flag indicating if this workflow run is an evaluation run triggered automatically after another workflow run completed

evaluation_run_info
EvaluationRunInfo · object

Contains information about the evaluation that was triggered for a workflow run. This is stored in the source workflow run after evaluation completes.