Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Input for running a simulation, either from an inline configuration or an existing plan.

plan
object

The simulation to run. A run plan is created for it behind the scenes.

planId
string<uuid>

Run a plan that already exists instead of describing one. Mutually exclusive with plan.

saveAsPlanName
string

Keep this run as a reusable plan under this name.

Left unset, the run still needs a plan to execute, but it is created hidden: it does not appear in GET /v1/simulation/plan and exists only to carry the run. Applies only alongside plan, since planId names a plan that already exists.

Minimum string length: 1
Example:

"Billing regression"

variables
object

Runtime variables that override the values defined on the plan. Accepts one of two formats:

Option 1, global (a flat key-value object): { "orderNumber": "12345", "environment": "staging" }

Option 2, per-scenario (an array of objects with scenarioId + variables): [ { "scenarioId": "550e8400-...", "variables": { "orderNumber": "12345" } }, { "scenarioId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } } ]

On a flow-based plan the global format applies to every variant the run resolves. The per-scenario format targets scenarios, so use flowVariables to override a specific flow or variant instead.

Example:
flowVariables
object[]

Runtime variable overrides targeted at the plan’s customer flows, taking precedence over the values pinned on the flow attachment.

An entry without variantId applies to every variant the attachment resolves. A flow that is not attached to this plan, or a variant that does not belong to the flow, is rejected rather than ignored.

Example:

Response

The run that was started

data
object
required

A started simulation run.