# Update simulation (/docs/api-reference/simulation/updateSimulation)

> Update an existing simulation. Pass the full `scenarios` array (existing entries you want to keep plus any changes).



**PUT** `/simulations/{simulation_id}`

Update an existing simulation. Pass the full `scenarios` array (existing entries you want to keep plus any changes).

```yaml
operationId: updateSimulation
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        properties:
          name:
            type: string
            description: Name of the simulation for identification.
          agent_id:
            type: integer
            description: ID of the agent to test.
          number_of_call_to_make:
            type: integer
            minimum: 1
            maximum: 3
            description: Number of calls to make per scenario (default 1, max 3).
          concurrent_call_count:
            type: integer
            minimum: 1
            maximum: 3
            description: Number of concurrent calls to run (default 3, max 3).
          max_call_duration_in_minutes:
            type: integer
            minimum: 1
            maximum: 10
            description: Maximum duration for each call in minutes (default 3, max 10).
          scenarios:
            type: array
            description: >-
              Full scenario list. Include existing scenarios you want to keep, plus any new or
              updated ones.
            items:
              type: object
              required:
                - name
                - description
                - expected_result
              properties:
                id:
                  type: integer
                  description: Include this to update an existing scenario; omit it to add a new one.
                name:
                  type: string
                  description: Name of the test scenario.
                description:
                  type: string
                  description: Updated instructions for the test scenario.
                expected_result:
                  type: string
                  description: Updated expected outcome from the agent.
                selected_voices:
                  type: array
                  description: Updated voice configurations for the test calls.
                  items:
                    type: object
                    required:
                      - id
                      - provider
                    properties:
                      id:
                        type: string
                        description: Voice ID from the provider.
                      provider:
                        type: string
                        enum:
                          - eleven_labs
                          - play_ht
                          - deepgram
                          - cartesia
                          - rime
responses:
  '200':
    description: Updated simulation.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            simulation:
              type: object
              description: A test simulation for an agent.
              properties:
                id:
                  type: integer
                  example: 772
                name:
                  type: string
                bot_id:
                  type: object
                  description: The agent under test.
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                status:
                  type: string
                  enum:
                    - Draft
                    - Pending
                    - In Progress
                    - Calculating Summary
                    - Completed
                    - Stopped
                number_of_call_to_make:
                  type: integer
                concurrent_call_count:
                  type: integer
                max_call_duration_in_minutes:
                  type: integer
                scenarios_ids:
                  type: array
                  description: Scenario records attached to this simulation.
                  items:
                    type: object
                    additionalProperties: true
                what_went_wrong:
                  oneOf:
                    - type: string
                    - type: boolean
                suggestions_for_improvement:
                  oneOf:
                    - type: string
                    - type: boolean
                prompt_suggestion:
                  oneOf:
                    - type: string
                    - type: boolean
                is_auto_prompt_suggestions_applied:
                  type: boolean
                how_many_scenario_to_generate:
                  type: integer
                summary:
                  oneOf:
                    - type: string
                    - type: boolean
                analyticsData:
                  type: object
                  properties:
                    Positive:
                      type: integer
                    Negative:
                      type: integer
                    Neutral:
                      type: integer
                total_simulation_remaining_records:
                  type: integer
                total_simulation_in_progress_records:
                  type: integer
                total_simulation_finished_records:
                  type: integer
                total_records:
                  type: integer
                progress:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: integer
                  description: >-
                    Single-element array containing the progress percentage (0-100). Quirky shape
                    preserved for backwards compatibility.
                  example:
                    - 0
                simulation_call_recording:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                can_stop:
                  type: boolean
                active_calls_count:
                  type: integer
                create_date:
                  type: string
                  example: 05/06/2026 13:31:54
        example:
          success: true
          simulation:
            id: 456
            name: Customer Support Test (Updated)
            bot_id:
              id: 1234
              name: Customer Support Agent
            status: Draft
            number_of_call_to_make: 1
            concurrent_call_count: 3
            max_call_duration_in_minutes: 5
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

# Update an existing simulation
simulation_id = 456
update_data = {
    "name": "Updated Restaurant Test",
    "max_call_duration_in_minutes": 5,
    "scenarios": [
        {
            "name": "Updated Order Pizza",
            "description": "Updated instructions...",
            "expected_result": "Updated expected behavior..."
        }
    ]
}
response = client.simulation.update(simulation_id, update_data)
print(response)
```

**curl**

```bash
curl -X PUT "https://backend.omnidim.io/api/v1/simulations/{simulation_id}" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```
