---
title: "Cancel a running scan"
method: POST
path: "/api/v2/scans/cancel"
tags: ["Scans"]
---

# Cancel a running scan

`POST /api/v2/scans/cancel`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/scans/cancel`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Cancel a scan that is currently running or queued. Has no effect on already-completed or already-errored scans. The scan status will be set to "Errored" with a cancellation note.

## Request body

- ScansCancelRequest: Input for cancelling a running scan.
  - `organizationId` string: Organization that owns the scan.
  - `scanId` string, required: ID of the scan to cancel.

## Response `200`

Scan cancelled

- ScansCancelResponse
  - `cancelled` boolean, required: Whether the scan was successfully cancelled.

## Other responses

- `400`: Error Response
- `401`: Error Response

---

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