Skip to main content
POST
/
api
/
v2
/
workflows
/
{workflowSlug}
/
start
Start workflow by slug
curl --request POST \
  --url https://api.example.com/api/v2/workflows/{workflowSlug}/start \
  --header 'Content-Type: application/json' \
  --data '"<unknown>"'
{
  "workflowRunId": "<string>",
  "nextTaskId": "<string>"
}

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.

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.

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.