---
title: "Cancel Workflows"
method: POST
path: "/v1/workflow/cancel"
tags: ["Workflows"]
---

# Cancel Workflows

`POST /v1/workflow/cancel`

## Request

- Base URL: `https://api.tetrascience.com`
- URL: `https://api.tetrascience.com/v1/workflow/cancel`
- Auth: API key in header `ts-auth-token` and API key in header `x-org-slug`

Cancels one or more workflows by ID. Only workflows that haven't finished yet (`pending`, `queued`, or `in-progress`) are canceled.

Workflows that have already finished (`completed`, `failed`, or `canceled`), that can't be found in your organization, or that can't be canceled are skipped and don't return an error. To see how many workflows were actually canceled, check the `cancelledCount` value in the response.

When a workflow is canceled, its status changes to `canceled`.

## Request body

- object
  - `workflowIds` string[], required: The IDs of the workflows to cancel. You can include between 1 and 1,000 workflow IDs in each request.

## Response `200`

The request completed. The response shows how many of the requested workflows were canceled.

- object
  - `cancelledCount` integer, required: The number of workflows that were canceled. Workflows that had already finished, couldn't be found, or couldn't be canceled aren't counted.

## Other responses

- `400`: The request is invalid. For example, the `x-org-slug` header is missing, `workflowIds` is empty or has more than 1,000 items, or one of the IDs isn't a valid UUID.

---

[API](https://skmtc.dev/tetrascience/apis/pipelines.md) - [All operations](https://skmtc.dev/tetrascience/apis/pipelines/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrascience/apis/pipelines/revisions/e1d7d5790587?raw)
