---
title: "Stop or unqueue a message"
---

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

# Stop or unqueue a message

Path: CloudRaker Workspace API › My assistant

`POST /me/assistant/cancel`

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `id` (`cancelMyAssistantMessage.id`; string, required)
  - pattern `^[A-Za-z0-9_-]{1,80}$`

## Example request

```json
{
  "id": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/me/assistant/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "string"
}'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/me/assistant/cancel';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({id: 'string'})
};

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

### Python

```python
import requests

url = "https://api.cloudraker.com/me/assistant/cancel"

payload = { "id": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 202

Stop or unqueue a message

#### Example

```json
{
  "data": {
    "id": "string",
    "cancelled": "active"
  }
}
```

- `data` (`cancelMyAssistantMessage.response.202.data`; object, required)
  - `id` (`cancelMyAssistantMessage.response.202.data.id`; string, required)
  - `cancelled` (`cancelMyAssistantMessage.response.202.data.cancelled`; string, required)
    - one of `"active"`, `"queued"`

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`cancelMyAssistantMessage.response.400.success`; boolean, required)
  - one of `false`
- `error` (`cancelMyAssistantMessage.response.400.error`; array<unknown>, required)
- `data` (`cancelMyAssistantMessage.response.400.data`; unknown, required)

### 403

An active personal account is required.

### 404

The resource is unavailable to this user.

### 409

`not_running`: no matching reply is running or queued.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`cancelMyAssistantMessage.response.409.error`; string, required) — The sentence a human reads.
- `error_code` (`cancelMyAssistantMessage.response.409.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`cancelMyAssistantMessage.response.409.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`cancelMyAssistantMessage.response.409.issues.path`; string, required)
  - `code` (`cancelMyAssistantMessage.response.409.issues.code`; string, required)
  - `message` (`cancelMyAssistantMessage.response.409.issues.message`; string, required)


Source: https://docs.cloudraker.com/workspace/api/my-assistant/cancel-my-assistant-message/index.md
