Skip to main content
POST
Execute a workflow
A stored workflow runs its live version by default. To run the current draft instead, set environment to test:
See Save Version for how drafts and versions work.

Authorizations

x-api-key
string
header
required

Lyzr API key. Studio session keys (agk_, ags_) and durable sk- keys are accepted. Required on every endpoint except GET /node-types and a webhook-triggered execute that carries X-Webhook-Secret.

Body

application/json

Workflow execution request

workflow_id
string

Reference to a stored workflow. Preferred over inline JSON.

Example:

"wf_9f2c1a"

workflow
object

Inline workflow definition (legacy). Provide either workflow_id or workflow, not both.

input
object[]

Trigger data passed to the workflow's entry nodes.

environment
enum<string>
default:live

Which graph to run. live runs the deployed version, or the draft when no version has been deployed yet. test runs the current draft.

Available options:
live,
test

Response

Execution accepted; poll GET /executions/{id} for status.

Acknowledgement of an accepted run. Execution is asynchronous, so this response never contains results. Fetch outputs from GET /executions/{id} or the execution event stream.

execution_id
string
Example:

"exec_5b7d3e"

status
string
Example:

"running"