> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Jobs Batch V1

> Cancel up to 50 jobs in one call. Per-row outcomes — already-terminal jobs (succeeded/failed/cancelled) or unknown ids are reported in their own row without…

<Warning>
  **Confirm your deployment before running this request.** This page describes an API contract;
  a published reference does not establish hosted availability. Check the dated
  [host report](/api-reference/hosts) and obtain your deployment URL and credentials.
  Replace the example host if your provisioned service uses a different URL.
</Warning>

Cancel up to 50 jobs in one call.

Per-row outcomes — already-terminal jobs (succeeded/failed/cancelled)
or unknown ids are reported in their own row without blocking the
others. Single Redis sentinel write per cancellable row.

### Request body

`CancelBatchRequest`

<ParamField body="job_ids" type="string (uuid)[]" required>
  List of job UUIDs to cancel (1..50). Already-terminal jobs surface as per-row errors without blocking the rest. Minimum items: `1`. Maximum items: `50`.
</ParamField>

<ParamField body="reason" type="string,null">
  Optional reason applied to every cancelled row. Stamped on `job.error` like the single-job cancel endpoint. Maximum length: `500`.
</ParamField>

### Response

`CancelBatchResponse`

<ResponseField name="cancelled" type="integer" required />

<ResponseField name="skipped" type="integer" required />

<ResponseField name="results" type="CancelBatchItemResult[]" required>
  <Expandable title="CancelBatchItemResult">
    <ResponseField name="job_id" type="string" required />

    <ResponseField name="cancelled" type="boolean" required />

    <ResponseField name="error" type="string,null" />
  </Expandable>
</ResponseField>

### Status codes

| Code | Meaning |
| - | - |
| `200` | Successful Response |
| `422` | Validation Error |

### Using this contract

Read the [source OpenAPI document](/spec/computer-use.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

<RequestExample>
  ```bash cURL theme={null}
  curl --silent --show-error --fail-with-body --request POST \
    --url 'https://api.computer.stateset.app/api/v1/jobs/cancel-batch' \
    --header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "job_ids": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "reason": "Two-person tent, green — replacement for damaged pole set."
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "cancelled": 1,
    "skipped": 1,
    "results": [
      {
        "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "cancelled": false,
        "error": "string"
      }
    ]
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.