Workflow Definitions API
POST/api/workflow-definitions/simulate
Product availabilityAlgaPSA

Simulate a workflow definition draft

Executes an inline draft definition in a zero-side-effect simulator: expressions and transforms run for real, action.call steps are stubbed (fixture > schema-shaped placeholder > empty object) with their evaluated inputs recorded, and waits pause the run unless a fixture resumes them. Omit payload to have one synthesized from the trigger event schema or the workflow payload schema. Returns status, a per-step trace, final vars/payload, the stubbed action invocations, and any errors or warnings.

RBAC · workflow

Request body

Content type: application/json · schema WorkflowDefinitionSimulateBody

definitionobjectRequired
Workflow definition DSL document (nodes, edges, triggers, payload schema, etc.).
payloadobject
Workflow payload used as-is (wins over eventPayload and synthesis).
eventPayloadobject
Source event payload, run through the trigger payloadMapping.
eventTypestring
Event to synthesize a payload for when payload/eventPayload are omitted.
fixturesobject
Stub outputs keyed by step id or actionId. { "$error": { message } } makes a stubbed action fail; wait steps resume from their fixture.
optionsobject
maxStepsinteger
maxForEachIterationsinteger
maxDurationMsinteger

Response body

Success response 200 · schema UnversionedV1Success

dataanyOfRequired
anyOf (option 1)object
anyOf (option 2)array of object
itemsobject
metaobject

Response codes

200
Simulation completed (see status: completed | paused-at-wait | failed).
400
Invalid request.
401
API key missing/invalid.
403
Caller lacks the required permission.
429
Simulation rate limit exceeded.
500
Unexpected error.