---
title: "Cancel Single Workflow"
method: POST
path: "/v1/workflow/workflows/{workflowId}/cancel"
tags: ["Workflows"]
---

# Cancel Single Workflow

`POST /v1/workflow/workflows/{workflowId}/cancel`

## Request

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

Cancels a single workflow. Only a workflow that hasn't finished yet (`pending`, `queued`, or `in-progress`) is canceled. When a workflow is canceled, its status changes to `canceled`.

The endpoint returns `200` with the workflow ID even when the workflow wasn't canceled. For example, it returns `200` when the workflow had already finished or can't be found in your organization. To confirm that the workflow was canceled, use [Get Single Workflow Details](https://developers.tetrascience.com/reference/dl-fi-get-single-workflow) and check its status.

To cancel several workflows in one request, use [Cancel Workflows](https://developers.tetrascience.com/reference/dl-fi-cancel-workflows), which also returns how many workflows were canceled.

This endpoint doesn't take a request body.

## Path parameters

- `workflowId` string, uuid, required

## Response `200`

The request completed. The response doesn't show whether the workflow was canceled.

- object
  - `workflowId` string, uuid, required: The workflow ID from the request.

## Other responses

- `400`: The request is invalid because the `x-org-slug` header is missing.

---

[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)
