---
title: "Cancel Selected V1"
method: POST
path: "/v1/simulations/cancel-selected"
tags: ["v1", "simulations"]
---

# Cancel Selected V1

`POST /v1/simulations/cancel-selected`

## Request

- Base URL: `https://thrustlab.com`
- URL: `https://thrustlab.com/v1/simulations/cancel-selected`
- Auth: HTTP bearer

Cancel a caller-selected set of runs of any kind in one call.

Every id is ownership-checked BEFORE anything is cancelled — a cross-user or
missing id fails the whole call with 404 ``resource_missing`` and no
existence leak, exactly like ``run-selected``. Rows that cannot be cancelled
are *skipped* with a reason rather than failing the batch: terminal rows,
drafts (delete those instead) and running single-points (they finish in
seconds). Queued rows are cancelled immediately with a full refund. A
running sweep or dynamic run gets a durable cancel request the worker
honours at its next point or integration chunk boundary, so it comes back
under ``requested``: the run stays ``running``, keeps the results it has
already produced, and turns ``canceled`` with a partial result and a full
refund when the worker stops.

## Request body

- CancelSelectedBody
  - `run_ids` string[], required: Run ids of any kind: sim_, sweep_ or dyn_ prefixed.

## Response `200`

Successful Response

- CancelBatchResult: ``canceled``: terminal now — the queued rows, whose status flips at request time and whose credits are refunded immediately. ``requested``: running sweeps AND running dynamic runs; the worker honours the request at its next point or integration chunk boundary, keeps what it solved, refunds, and the row turns canceled then. ``skipped``: rows the batch left alone, with the reason.
  - `canceled` string[], required
  - `requested` string[], required
  - `skipped` CancelSkipped[], required
    - `id` string, required
    - `reason` 'already_terminal' | 'draft' | 'running_single_point', required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thrustlab/apis/thrustlab-api.md) · [All operations](https://skmtc.dev/thrustlab/apis/thrustlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thrustlab/apis/thrustlab-api/revisions/c19717e52529?raw)
