Set Workflow Step Order
Move any number of steps in one change: send the whole tree as you want it, the same shape Get Workflow Definition answers, with ids only. Loops, folders and batch steps nest in body; If/Else in then and else. Send the revision you last read in If-Match; the response's meta.revision is the new one.
Path
The workflow's id.
Headers
Required. The draft revision you last read (the revision from Get Workflow Definition, or meta.revision from your last change). The change applies only if nobody changed the draft since: otherwise it answers 412 with the current revision in error.details.revision. Send it as a strong entity tag ("r_..."): a weak one (W/"...") never matches and answers 412. Without it the request answers 428.
Optional. The id of a child organization of your API key's company to act on. Leave it out to act on the key's own company. See Child organizations.
Body
The whole step tree, ids only.
The whole step tree, top level first: each step is { id, body?, then?, else? }, nesting the steps it holds. It must hold every step of the draft exactly once.
idstringrequiredThe step's id, from Get Workflow Definition.
Response fields
stepsarray of objectsThe steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else).
idstringThe step's id. Stable across edits; never positional.
numbernumberThe number the editor shows for this step, in execution order. Null for a folder, which the editor does not number.
namestringThe step's display name.
appSlugstringThe app the step runs, or the built-in step type (iterate, ifElse, map, ...).
appVersionstringThe app version the step is pinned to. "0" for built-in step types.
actionIdstringThe app action the step runs. Null for a built-in step type.
functionIdstringThe function this step calls, for a function call step.
parentStepIdstringThe step this one sits inside (a loop, group, folder or if/else). Null at the top level.
slotstringWhere the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane).
stepsbodythenelse
depthnumberHow deeply the step is nested. 0 at the top level.
isDisabledbooleanTrue when the step is turned off and runs skip it.
isConfiguredbooleanWhether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated.
bodyarraySteps nested inside this one, in order. Present when it has any; each has the same keys.
thenarraySteps nested inside this one, in order. Present when it has any; each has the same keys.
elsearraySteps nested inside this one, in order. Present when it has any; each has the same keys.