Skip to main content
POST
Start workflow by slug

Headers

X-Sample-Start-Data-Parse-Method
enum<string>

Controls how the request body is parsed for start data. 'standard' (default): expects start data nested under a 'startData' key, e.g. { "startData": { "foo": "bar" } }. 'top-level': treats the entire request body as start data, e.g. { "foo": "bar" }. This header is experimental and may change in the future.

Available options:
standard,
top-level

Path Parameters

workflowSlug
string
required

The slug of the workflow definition to start.

Query Parameters

waitForNextTask
enum<string>

Whether to wait for the first task before responding. Set to false to return as soon as the workflow run is queued.

Available options:
true,
false

Body

application/json

The workflow input data. Format depends on X-Sample-Start-Data-Parse-Method header: If 'standard' (default), wrap your data in a 'startData' key: { "startData": { ... } }. If 'top-level', provide your data directly at the root level: { ... }. For multipart/form-data requests, include fields and files directly in the form data.

The workflow input data. Format depends on X-Sample-Start-Data-Parse-Method header: If 'standard' (default), wrap your data in a 'startData' key: { "startData": { ... } }. If 'top-level', provide your data directly at the root level: { ... }. For multipart/form-data requests, include fields and files directly in the form data.

Response

Workflow initiated successfully.

workflowRunId
string
required

The ID of the newly started workflow run. This can be used to check its status or cancel the run.

nextTaskId
string | null
required

The ID of the first task in the workflow run, or null if the workflow completes synchronously or has no starting task.