---
title: "Update a run plan"
method: PUT
path: "/v1/simulation/plan/{planId}"
tags: ["Simulation Run Plan"]
---

# Update a run plan

`PUT /v1/simulation/plan/{planId}`

Updates an existing simulation run plan by its ID.

## Path parameters

- `planId` string, uuid, required

## Request body

- UpdateRunPlanInput — Input for updating an existing simulation run plan
  - `isHidden` boolean — Whether this plan is hidden from GET /v1/simulation/plan. A run started without `saveAsPlan` creates a hidden plan to carry it. Send `{ "name": "...", "isHidden": false }` to keep that configuration as a reusable plan, which is what the app does when you save a one-off run.
  - `name` string — Name of the run plan
  - `description` string — Description of the run plan
  - `direction` 'INBOUND' | 'OUTBOUND' — Direction of the simulation (INBOUND or OUTBOUND)
  - `iterationCount` integer — Number of iterations to run for each test case (1-10000)
  - `maxConcurrentJobs` integer — Maximum number of concurrent simulation jobs
  - `maxSimulationDurationSeconds` integer — Maximum duration in seconds for each simulation
  - `silenceTimeoutSeconds` integer — Timeout in seconds for silence detection
  - `endCallPhrases` string[] — Phrases that trigger end of call. Empty array disables the feature.
  - `endCallReasons` string[] — Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.
  - `executionMode` 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT' — Execution mode (PARALLEL or SEQUENTIAL)
  - `scenarios` object[] — Deprecated: use `flows` instead. Replaces the scenarios on this run plan. Omit to leave them unchanged; send an empty array to detach them all, which is how a scenario-based plan is moved over to flows.
    - `id` string, uuid, required — Scenario ID
    - `variables` object — Template variables for this scenario instance. The same scenario can appear multiple times with different variables.
  - `flows` RunPlanFlowSelection[] — Replaces the customer flows attached to this run plan. Omit to leave them unchanged; send an empty array to detach them all.
    - `id` string, uuid, required — The customer flow to run.
    - `happyPath` boolean — Run the flow's happy path. Resolved when the run starts, so it follows the flow.
    - `edgeCases` union — `"ALL"` runs every edge case the flow has when the run starts, so one added later is covered. An array runs only the ones you name, each able to carry its own persona override and values.
      - 'ALL'
      - RunPlanEdgeCaseSelection[]
        - `id` string, uuid, required — The edge case to run.
        - `personaOverrideId` string, uuid, nullable — Run this one as that persona instead of its own.
        - `variables` object — Values for this one only.
    - `personaOverrideId` string, uuid, nullable — Runs everything this attachment resolves as that persona instead of its own.
    - `variables` object — Values for everything it resolves.
  - `personas` object[] — Personas to include in this run plan
    - `id` string, uuid, required
  - `agentEndpoints` object[] — Agent endpoints to include in this run plan
    - `id` string, uuid, required
  - `metrics` RunPlanMetricRef[] — Metric definitions to include in this run plan. Reference each by `id` (UUID) or `slug`.
    - `id` string, uuid — Metric definition UUID. Provide either this or `slug`, not both.
    - `slug` string — Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`, not both.
    - `metricId` string — Alias of `slug` accepted for backwards compatibility. Use `slug` for new integrations.

## Response `200`

The updated run plan

- object
  - `data` RunPlanResponse, required — A simulation run plan defining the test matrix
    - `id` string, uuid, required — Unique identifier of the run plan
    - `name` string, required — Name of the run plan
    - `description` string, nullable — Description of the run plan
    - `direction` 'INBOUND' | 'OUTBOUND', required — Direction of the simulation (INBOUND or OUTBOUND)
    - `iterationCount` integer, required — Number of iterations to run for each test case
    - `maxConcurrentJobs` integer, required — Maximum number of concurrent simulation jobs
    - `maxSimulationDurationSeconds` integer, required — Maximum duration in seconds for each simulation
    - `silenceTimeoutSeconds` integer, required — Timeout in seconds for silence detection
    - `endCallPhrases` string[], required — Phrases that trigger end of call. Empty array means disabled.
    - `endCallReasons` string[], required — Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array means disabled.
    - `executionMode` 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT', required — Execution mode (PARALLEL or SEQUENTIAL)
    - `scenarios` object[], required — Deprecated: use `flows` instead. Scenarios included in this run plan.
      - `id` string, uuid, required
      - `variables` object — Template variables for this scenario instance. Absent when no variables are set. The same scenario can appear multiple times with different variables.
    - `flows` RunPlanFlowSelection[], required — Customer flows included in this run plan
      - `id` string, uuid, required — The customer flow to run.
      - `happyPath` boolean — Run the flow's happy path. Resolved when the run starts, so it follows the flow.
      - `edgeCases` union — `"ALL"` runs every edge case the flow has when the run starts, so one added later is covered. An array runs only the ones you name, each able to carry its own persona override and values.
        - 'ALL'
        - RunPlanEdgeCaseSelection[]
          - `id` string, uuid, required — The edge case to run.
          - `personaOverrideId` string, uuid, nullable — Run this one as that persona instead of its own.
          - `variables` object — Values for this one only.
      - `personaOverrideId` string, uuid, nullable — Runs everything this attachment resolves as that persona instead of its own.
      - `variables` object — Values for everything it resolves.
    - `personas` object[], required — Personas included in this run plan. Only meaningful alongside `scenarios`.
      - `id` string, uuid, required
    - `agentEndpoints` object[], required — Agent endpoints included in this run plan
      - `id` string, uuid, required
    - `evaluators` object[], required — Deprecated: Use metrics instead. Evaluators included in this run plan.
      - `id` string, uuid, required
    - `metrics` object[], required — Metric definitions included in this run plan
      - `id` string, uuid, required
    - `testCaseCount` integer, required — Total number of test cases generated from the plan configuration
    - `createdAt` string, required — When the run plan was created
    - `updatedAt` string, required — When the run plan was last updated

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `429` — Too Many Requests
- `500` — Internal Server Error

## Changes

- **2026-08-17** `887b091b3d81` — 11 warning, 8 info
  - the `iterationCount` request property's max was set to `10000.00`
  - added the new `conflict` enum value to the `type` response property for the response status `400`
  - 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 `404`
  - …15 more
- **2026-04-20** `a1a7faf3a53b` — 1 info
  - added the optional property `data/scenarios/items/variables` to the response with the `200` status

[Change history](https://skmtc.dev/roarkhq/apis/roark-analytics-api/changes/v1/simulation/plan/:planId/put.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)
