---
title: "Run a simulation plan"
method: POST
path: "/v1/simulation/plan/{planId}/job"
tags: ["Simulation Run Plan Job"]
deprecated: true
---

# Run a simulation plan

`POST /v1/simulation/plan/{planId}/job`

> **Deprecated.**

Deprecated: use POST /v1/simulation/run, which does the same thing and can also take the
plan configuration inline, so a one-off run does not have to create a plan first.

Creates and executes a job for an existing simulation run plan. Optionally provide runtime
variables to override plan-defined variables.

## Path parameters

- `planId` string, uuid, required

## Request body

- RunSimulationPlanBody — Optional request body for running a simulation plan with runtime variables
  - `variables` union — Values for the {{variables}} the run resolves, overriding whatever the plan has pinned. An object applies them to the whole run: { "orderNumber": "12345", "tier": "gold" } An array applies them per flow, or to just its happy path or one of its edge cases, when a single set will not do. Each entry carries what it applies to: [ { "flowId": "550e8400-...", "variables": { "orderNumber": "12345" } }, { "flowId": "550e8400-...", "happyPath": true, "variables": { "orderNumber": "55555" } }, { "flowId": "550e8400-...", "edgeCaseId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } } ] An entry that narrows to neither covers everything that flow resolves. A flow this plan does not attach, or an edge case that does not belong to the flow, is rejected rather than ignored. A plan built on scenarios rather than customer flows targets them the same way, with `scenarioId` in place of `flowId`. That form is deprecated alongside scenarios themselves, and still accepted so runs against those plans keep working.
    - object — Global format: key-value pairs that apply to ALL scenarios in the plan
    - object[] — Values scoped to the flows this plan runs
      - `flowId` string, uuid, required — A customer flow this plan runs.
      - `happyPath` true — Narrow to the flow's happy path.
      - `edgeCaseId` string, uuid — Narrow to one edge case of that flow.
      - `variables` object, required — The values to apply.
    - object[] — Deprecated, for plans built on scenarios. Plans built on customer flows target them with `flowId` instead.
      - `scenarioId` string, uuid, required — ID of the scenario to apply variables to
      - `variables` object, required — Key-value pairs for this scenario

## Response `200`

Successfully triggered simulation run plan

- object
  - `data` RunSimulationPlanResponse, required — Response when triggering a simulation run plan
    - `simulationRunPlanId` string, uuid, required — ID of the simulation run plan that was executed
    - `simulationRunPlanJobId` string, uuid, required — ID of the simulation run plan job that was created
    - `status` 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS', required — Initial status of the job
    - `createdAt` string, required — When the job was created

## Other responses

- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Simulation run plan not found
- `429` — Too Many Requests
- `500` — Internal Server Error

## Changes

- **2026-08-26** `b4a59c7057ca` — 1 breaking, 6 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `404`
  - for the `path` request parameter `planId`, the type/format was generalized from ``/`` to `string`/`uuid`
  - added the optional property `details` to the response with the `404` status
  - added the optional property `param` to the response with the `404` status
  - …3 more
- **2026-08-20** `9080f2313118` — 1 warning
  - added the new `PREPARING_CAPACITY` enum value to the `data/status` response property for the response status `200`
- **2026-08-17** `887b091b3d81` — 1 breaking, 8 warning, 3 info
  - removed `subschema #2` from the `variables` request property `anyOf` list
  - added the new `conflict` enum value to the `type` response property for the response status `401`
  - added the new `conflict` enum value to the `type` response property for the response status `403`
  - added the new `conflict` enum value to the `type` response property for the response status `429`
  - …8 more

[Change history](https://skmtc.dev/roarkhq/apis/roark-analytics-api/changes/v1/simulation/plan/:planId/job/post.md)

---

[API](https://skmtc.dev/roarkhq/apis/roark-analytics-api.md) · [All operations](https://skmtc.dev/roarkhq/apis/roark-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roarkhq/roark-analytics-api/revisions/1d61b68e9429/schema)
