---
title: "Cancel an operator turn"
description: "Requests cancellation of a queued or running turn. An unknown or malformed turn id answers 404; a turn that already finished answers 409."
canonical: "https://www.cool.computer/docs/api-reference/operator/cancel-an-operator-turn"
---
# Cancel an operator turn

> Requests cancellation of a queued or running turn. An unknown or malformed turn id answers 404; a turn that already finished answers 409.

```http
POST https://api.cool.computer/api/operator/turns/{id}/cancel
```

Requests cancellation of a queued or running turn. An unknown or malformed turn id answers 404; a turn that already finished answers 409. Callers: the account owner with a user API key, user access token, claimed agent access token, or MCP token; organization API keys are refused.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Parameters

- `id` (path, string, at least 1 characters, required): Operator turn identifier.

## Responses

- `202`: The turn with its cancellation requested.
  - `application/json` (object)
    - `id` (string, required)
    - `conversation_id` (string)
    - `source` ("browser" or "api" or "email" or "mcp" or "messaging" or "comments" or "system", required): Who queued the turn. messaging is a direct message from a connected Telegram or Slack account. comments is a site owner asking the agent to handle comments on the site's page. system is Cool Computers itself: a turn that reports a recorded operation result, or one that wakes the chat because a background process it started ended or, as a monitor, printed new lines.
    - `message` (string, required)
    - `state` ("queued" or "claimed" or "running" or "succeeded" or "failed" or "cancelled" or "interrupted", required)
    - `attempt` (integer, at least 0, required)
    - `cancellation_requested` (boolean, required)
    - `presented` (boolean, required): The turn's message has been recorded in the conversation's events.
    - `attachments` (array of object, required)
      - `id` (string, required)
      - `filename` (string, required)
      - `media_type` (string, required): image/png, image/jpeg, image/gif, image/webp, video/mp4, video/quicktime, video/webm, or a text type.
      - `size_bytes` (integer, at least 0, required)
      - `width` (integer, at least 1): An image's stored width, the width the model sees.
      - `height` (integer, at least 1): An image's stored height, the height the model sees.
    - `provider` (string, required)
    - `model` (string, required)
    - `usage` (any): Token usage as the provider reported it.
    - `error` (string)
    - `created_at` (string, date-time, required)
    - `completed_at` (string, date-time)
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.
- `409`: Conflict.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/operator/turns/$PARAM_ID/cancel" \
  -H "authorization: Bearer $TOKEN"
```
