---
title: "Cancel a pending or in-flight async operation"
method: DELETE
path: "/v1/default/banks/{bank_id}/operations/{operation_id}"
tags: ["Operations"]
---

# Cancel a pending or in-flight async operation

`DELETE /v1/default/banks/{bank_id}/operations/{operation_id}`

## Request

- Base URL: `https://hindsight.vectorize.io` (the document declares no server; this is the origin it was published from)
- URL: `https://hindsight.vectorize.io/v1/default/banks/{bank_id}/operations/{operation_id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vectorize/apis/hindsight-http-api/docs/v1/default/banks/:bank_id/operations/:operation_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Cancel a queued or running async operation. A 'pending' operation is never started. A 'processing' one is cancelled cooperatively: the row is marked 'cancelled' immediately and the worker running it stops at its next checkpoint, so work already in flight may finish the batch it is on. This also clears operations stranded in 'processing' by a crashed worker. Returns 409 for operations that already reached a terminal state.

## Path parameters

- `bank_id` string, required
- `operation_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- CancelOperationResponse: Response model for cancel operation endpoint.
  - `success` boolean, required
  - `message` string, required
  - `operation_id` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-04** `4fda98b75f63`: 1 warning
  - removed the optional property `detail/items/url` from the response with the `422` status
- **2026-05-15** `0d08f271b9db`: 3 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
  - added the optional property `detail/items/url` to the response with the `422` status

[Operation history](https://skmtc.dev/vectorize/apis/hindsight-http-api/changes/v1/default/banks/:bank_id/operations/:operation_id/delete.md)

---

[API](https://skmtc.dev/vectorize/apis/hindsight-http-api.md) - [All operations](https://skmtc.dev/vectorize/apis/hindsight-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vectorize/apis/hindsight-http-api/revisions/45e711cd0897?raw)
