---
title: "Cancel a running session."
method: POST
path: "/v0/sessions/{sessionId}/cancel"
tags: ["Workspaces"]
---

# Cancel a running session.

`POST /v0/sessions/{sessionId}/cancel`

## Request

- Base URL: `https://api.conductor.build` (the document declares no server; this is the origin it was published from)
- URL: `https://api.conductor.build/v0/sessions/{sessionId}/cancel`
- Auth: HTTP bearer

Stop the agent's in-progress turn and drop any not-yet-delivered queued messages for the session. Idempotent: a no-op when the agent is already idle. Preserves the workspace and session history. Cancellation completes asynchronously — poll the session status endpoint until idle to confirm.

## Path parameters

- `sessionId` string, required

## Response `200`

Default Response

- object
  - `workspaceId` string, required
  - `sessionId` string, required
  - `status` union, required
    - 'idle'
    - 'working'
    - 'error'
  - `canceledQueuedMessages` number, required

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid bearer token.
- `404`: Resource not found.
- `default`: Error response.

---

[API](https://skmtc.dev/conductor-build/apis/roundhouse-public-api.md) - [All operations](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/revisions/1f39c7f7f219?raw)
