---
title: "Cancel a workflow run in the selected workspace"
description: "Requires a verified current member session or configured backend automation credential. Source labels provide no authority. Resource IDs must belong to the selected workspace; member contact visibility is checked. Inline definitions and database-lookup bypasses are rejected."
---

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

Path: Channel Automation API › Actions

`POST /api/unified-workflow/cancel-workflow/{taskId}`

Requires a verified current member session or configured backend automation credential. Source labels provide no authority. Resource IDs must belong to the selected workspace; member contact visibility is checked. Inline definitions and database-lookup bypasses are rejected.

## Authentication

Requires one of the following:

- `BearerAuth`, http, header `Authorization`, format `JWT`
- `BackendTriggerAuth`, apiKey, in header, header `X-Trigger-Secret`

## Path parameters

- `taskId` (`post/api/unified-workflow/cancel-workflow/taskId.path.taskId`; string, required)

## Header parameters

- `X-Workspace-Id` (`post/api/unified-workflow/cancel-workflow/taskId.header.X-Workspace-Id`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/unified-workflow/cancel-workflow/<taskId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Workspace-Id: string'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/unified-workflow/cancel-workflow/<taskId>';
const options = {
  method: 'POST',
  headers: {'X-Workspace-Id': 'string', Authorization: 'Bearer <token>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/unified-workflow/cancel-workflow/<taskId>"

headers = {
    "X-Workspace-Id": "string",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

Existing successful result

### 400

Invalid resource input or workflow override

### 401

Missing or invalid caller identity

### 403

Workspace conflict or contact visibility denied

### 404

Resource not found in the selected workspace

### 503

Identity


Source: https://developer.channelautomations.com/api/post-api-unified-workflow-cancel-workflow-task-id/index.md
