Skip to main content
POST
/
workflow
/
run
Execute a workflow synchronously
curl --request POST \
  --url http://localhost:3001/workflow/run \
  --header 'Content-Type: application/json' \
  --data '
{
  "workflowName": "<string>",
  "input": "<unknown>",
  "workflowId": "<string>",
  "taskQueue": "<string>",
  "timeout": 123
}
'
{
  "workflowId": "<string>",
  "output": "<unknown>",
  "trace": {
    "destinations": {
      "local": "<string>",
      "remote": "<string>"
    }
  },
  "status": "completed",
  "error": "<string>"
}

Body

application/json
workflowName
string
required

The name of the workflow to execute

input
any
required

The payload to send to the workflow

workflowId
string

(Optional) The workflowId to use. Must be unique

taskQueue
string

The name of the task queue to send the workflow to

timeout
number

(Optional) The max time to wait for the execution, defaults to 30s

Response

The workflow result

workflowId
string

The workflow execution id

output
any

The output of the workflow, null if workflow failed

trace
object

An object with information about the trace generated by the execution

status
enum<string>

The workflow execution status

Available options:
completed,
failed
error
string | null

Error message if workflow failed, null otherwise