---
title: "Cancel a pending or running prompt"
method: POST
path: "/api/v1/prompts/{id}/cancel"
tags: ["Prompts"]
---

# Cancel a pending or running prompt

`POST /api/v1/prompts/{id}/cancel`

## Request

- Base URL: `https://getorquesta.com`
- URL: `https://getorquesta.com/api/v1/prompts/{id}/cancel`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Tells the project's agent to stop the prompt and marks it `failed` with error
`Cancelled by user`. A prompt that already finished keeps its outcome and the call
returns `cancelled: false` with its current status. Requires a CLI token (`oclt_`) or an
org API key with `prompts:write`; agent tokens are rejected.

## Path parameters

- `id` string, uuid, required

## Response `200`

Cancellation result.

- object
  - `cancelled` boolean, required
  - `status` string, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: Insufficient scope, revoked token, or project-scope mismatch.
- `404`: Resource not found (or invisible to your scope).
- `500`: Internal server error.

---

[API](https://skmtc.dev/getorquesta/apis/orquesta-public-api.md) · [All operations](https://skmtc.dev/getorquesta/apis/orquesta-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getorquesta/apis/orquesta-public-api/revisions/7d27e0ae8324?raw)
