---
title: "Pause AI and cancel queued AI replies for a workspace contact"
description: "Requires a verified session, current workspace membership, and contact tenancy. Body userId and workspaceId are ignored; actor identity comes from the verified session."
---

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

`POST /api/ai/conversation-state/{contactId}/takeover`

Requires a verified session, current workspace membership, and contact tenancy. Body userId and workspaceId are ignored; actor identity comes from the verified session.

## Authentication

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

## Path parameters

- `contactId` (`post/api/ai/conversation-state/contactId/takeover.path.contactId`; string, required)

## Header parameters

- `X-Workspace-Id` (`post/api/ai/conversation-state/contactId/takeover.header.X-Workspace-Id`; string, optional) — Selected workspace; defaults to session metadata but always verifies membership.

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/ai/conversation-state/<contactId>/takeover' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/ai/conversation-state/<contactId>/takeover';
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/ai/conversation-state/<contactId>/takeover"

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

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

print(response.text)
```

## Responses

### 200

Action completed; success is true.

### 400

Missing workspace.

### 401

Missing or invalid session.

### 403

Not a workspace member.

### 404

Contact is outside the workspace or missing.

### 500

Mutation failed.

### 503

Access could not be verified; no mutation performed.


Source: https://developer.channelautomations.com/api/post-api-ai-conversation-state-contact-id-takeover/index.md
