Execute Workflow
Execute a workflow interactively over standard HTTP POST.
First turn (run_id absent in request body):
Starts a new interactive session, runs until pause/terminal, and returns a
run_id the client must echo back on all subsequent requests.
Subsequent turns (run_id present):
Resumes the paused session with new user input, runs until the next pause or
terminal state.
Cancellation (run_id present, run_input.command = "stop"):
Cancels the session, flushes state to MongoDB, returns status=CANCELLED.
Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Path Parameters
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Query Parameters
Workflow version to run. Applies to the first turn only; subsequent turns always use the version from the initial turn.
x >= 0Body
Request body for POST /v1/workflows/{workflow_id}/execute.
Protocol
- First turn — omit
run_id. The server creates aWorkflowRunsModelin MongoDB, derives therun_idfrom itsObjectId, and returns it in the response. - Subsequent turns — echo back the
run_idreceived in the previous response to continue the session. - Cancellation — echo back
run_idand setrun_input.command = "stop".
Response
Successful Response
Response body for POST /v1/workflows/{workflow_id}/execute.
Returned for both first-turn (no run_id in request) and subsequent turns.
Session identifier (= MongoDB ObjectId of the underlying WorkflowRun record). Include in all subsequent POST requests to continue this session.
Status of the workflow run after this turn.
not_started, started, running, failed, completed, paused, waiting_for_user_input, cancelled, aborted_looping_risk The turn that this response corresponds to (1-indexed).
All events emitted by the workflow runtime during this turn. Includes start/end-node events, LLM events, show-state events, and the terminal pause/end/error event.
True when the workflow paused and is waiting for user input in the next POST request.
True when the workflow has reached a terminal state (completed, failed, cancelled, or aborted).
Present when status is FAILED. Human-readable error message.
Serialised BusyWaitForUserMessageEvent payload when is_waiting_for_input=True. Describes what the workflow expects as input in the next turn.