---
title: "Update a scenario"
method: PUT
path: "/v1/simulation/scenario/{scenarioId}"
tags: ["Simulation Scenario"]
---

# Update a scenario

`PUT /v1/simulation/scenario/{scenarioId}`

Updates an existing simulation scenario by its ID.

## Path parameters

- `scenarioId` string, required

## Request body

- object — Input for updating an existing scenario
  - `name` string — New name for the scenario (updates the START node content)
  - `stepChanges` union[], required — List of step changes to apply to the scenario
    - union — A change to apply to a scenario step (create, update, or delete)
      - object — Create a new step in the scenario
        - `action` 'create', required — Create a new step
        - `type` 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'CUSTOMER_DTMF' | 'VOICEMAIL' | 'SCENARIO_LINK', required — The type of the new step
        - `content` string, required — The content/text of the new step
        - `linkedScenarioId` string, uuid — ID of the scenario to link to (for SCENARIO_LINK type steps)
        - `dtmfDigits` string — DTMF digits to send (for CUSTOMER_DTMF type steps)
        - `silenceDurationSeconds` integer — Duration of silence in seconds (for CUSTOMER_SILENCE type steps)
      - object — Update an existing step in the scenario
        - `action` 'update', required — Update an existing step
        - `nodeId` string, uuid, required — The ID of the step node to update
        - `type` 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'CUSTOMER_DTMF' | 'VOICEMAIL' | 'SCENARIO_LINK' — The new type of the step (optional)
        - `content` string — The new content/text of the step (optional)
        - `linkedScenarioId` string, uuid — ID of the scenario to link to (for SCENARIO_LINK type steps)
        - `dtmfDigits` string — DTMF digits to send (for CUSTOMER_DTMF type steps)
        - `silenceDurationSeconds` integer — Duration of silence in seconds (for CUSTOMER_SILENCE type steps)
      - object — Delete a step from the scenario
        - `action` 'delete', required — Delete an existing step
        - `nodeId` string, uuid, required — The ID of the step node to delete

## Response `200`

The updated scenario

- object
  - `data` object, required
    - `id` string, uuid, required — Unique identifier of the scenario
    - `name` string, nullable, required — Name of the scenario (from the start node content)
    - `description` string, nullable, required — Description of the scenario
    - `steps` object[], required — Ordered list of steps in the scenario (excludes the START node)
      - `nodeId` string, uuid, required — Unique identifier of the step node (use this for update/delete operations)
      - `type` 'START' | 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'CUSTOMER_DTMF' | 'VOICEMAIL' | 'SCENARIO_LINK', required — Type of step in the scenario
      - `content` string, nullable, required — Content/text of the step
      - `linkedScenarioId` string, uuid, nullable — ID of the linked scenario (only for SCENARIO_LINK type steps)
      - `dtmfDigits` string, nullable — DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, *, #, w/W for pauses.
      - `silenceDurationSeconds` integer, nullable — Duration of silence in seconds (only for CUSTOMER_SILENCE type steps)
    - `createdAt` string, required — Creation timestamp in ISO 8601 format
    - `updatedAt` string, required — Last update timestamp in ISO 8601 format

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

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