POST /plan-runs/:id/cancel
POST
/plan-runs/{id}/cancel
const url = 'https://example.com/plan-runs/example/cancel';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/plan-runs/example/cancelParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Successful response.
Media typeapplication/json
object
planRun
required
object
id
required
string
planId
string | null
source
required
string
projectId
required
string
agentName
required
string
promptTemplate
required
string
ref
string | null
providerOverride
string | null
modelOverride
string | null
maxCostUsd
number | null
dispatcherHandle
required
string
trigger
required
string
state
required
string
failureReason
string | null
createdAt
required
string
startedAt
string | null
endedAt
string | null
cancelledChild
required
object
childSeq
integer
runId
string
alreadyTerminal
required
boolean
Example
{ "planRun": { "source": "plan", "state": "queued" }}default
Section titled “default”Error response (see src/core/errors.ts).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
hint
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "hint": "example" }}