# Stop simulation (/docs/api-reference/simulation/stopSimulation)

> Stop a running simulation.



**POST** `/simulations/{simulation_id}/stop`

Stop a running simulation.

```yaml
operationId: stopSimulation
parameters:
  - name: simulation_id
    in: path
    required: true
    schema:
      type: integer
responses:
  '200':
    description: |
      Stop attempted. `success: true` when the simulation was
      running and is now stopped; `success: false` (still HTTP
      200) when the simulation isn't in a stoppable state — the
      `message` explains why. `disconnect_results` is only
      present on the success path.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            message:
              type: string
            disconnect_results:
              type: object
              description: Per-recording stop counts. Only present when `success` is true.
              properties:
                successful_disconnects:
                  type: integer
                failed_disconnects:
                  type: integer
                pending_stopped:
                  type: integer
        example:
          success: true
          message: Simulation stopped successfully
          disconnect_results:
            successful_disconnects: 0
            failed_disconnects: 0
            pending_stopped: 0
```

**Python SDK**

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

# Stop a running simulation
simulation_id = 456
response = client.simulation.stop(simulation_id)
print(response)
```

**curl**

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