---
title: "Cancel active automation workflows for a contact"
description: "Cancels active workflow runs, active sequence-backed workflow runs, and pending sequence message jobs for one contact. It does not delete workflow or sequence definitions."
---

> 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 › Contacts

`POST /api/contacts/{contactId}/cancel-active-workflows`

Cancels active workflow runs, active sequence-backed workflow runs, and pending sequence message jobs for one contact. It does not delete workflow or sequence definitions.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `contactId` (`post/api/contacts/contactId/cancel-active-workflows.path.contactId`; string, required) — Contact ID whose active automation should be cancelled.

## Header parameters

- `X-Workspace-Id` (`post/api/contacts/contactId/cancel-active-workflows.header.X-Workspace-Id`; string, optional) — Workspace context when the user has switched workspaces.

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/contacts/<contactId>/cancel-active-workflows' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/contacts/<contactId>/cancel-active-workflows';
const options = {method: 'POST', headers: {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/contacts/<contactId>/cancel-active-workflows"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 200

Active automation cancellation attempted and Supabase execution rows updated.

### 400

Contact or workspace ID missing.

### 401

Authentication required

#### Example

```json
{
  "error": "Authentication required",
  "success": false
}
```

- `error` (`post/api/contacts/contactId/cancel-active-workflows.response.401.error`; string, optional)
  - example `"Authentication required"`
- `success` (`post/api/contacts/contactId/cancel-active-workflows.response.401.success`; boolean, optional)
  - example `false`

### 404

Contact not found in the workspace.

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`post/api/contacts/contactId/cancel-active-workflows.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`post/api/contacts/contactId/cancel-active-workflows.response.500.details`; string, optional)
- `success` (`post/api/contacts/contactId/cancel-active-workflows.response.500.success`; boolean, optional)
  - example `false`


Source: https://developer.channelautomations.com/api/post-api-contacts-contact-id-cancel-active-workflows/index.md
