Skip to content

cancel

POST
/v1/requests/{id}/cancel
curl --request POST \
--url https://example.com/v1/requests/example/cancel
id
required
string
Media typeapplication/json
object
id
string
title
required
string
tool
string | null
callback_url

Terminal-event destination; requires the daemon callbacks.allowlist.

string | null
summary
string | null
source
object
integration

Server-verified integration token name; caller values are overwritten.

string | null
agent
string | null
session
string | null
session_title

Display-only session name; scoped rules always use the session ID.

string | null
cwd
string | null
repo
string | null
branch
string | null
host
string | null
kind
string
Allowed values: command edit review question custom
risk
string
Allowed values: low medium high
previews
Array<object>
object
type
required
string
Allowed values: text markdown code diff files command json html image video audio file pdf email
title
string | null
lang
string | null
inline
string | null
blob
string | null
mime
string | null
name
string | null
size
integer | null format: int64
files
Array<object> | null
object
path
required
string
blob
required
string
mime
required
string
size
required
integer format: int64
lang
string | null
entry
string | null
command
One of:
null
email
One of:
null
before_blob
string | null
after_blob
string | null
options
Array<object>
object
id
required
string
label
required
string
outcome
required
string
Allowed values: approve deny
style
string | null
input
One of:
null
timeout

Optional positive duration, at most one year. Absent uses config; null/none disables expiry.

string | null
on_timeout
string
Allowed values: deny approve expire
dedupe_key
string | null
status
string
Allowed values: pending approved denied answered expired cancelled
content_hash
string
created_at
integer format: int64
expires_at
integer | null format: int64
decision
One of:
null
run
One of:
null
Example
{
"source": {
"integration": null,
"agent": null,
"session": null,
"session_title": null,
"cwd": null,
"repo": null,
"branch": null,
"host": null
},
"kind": "command",
"risk": "low",
"previews": [
{
"type": "text",
"command": {
"shell": null,
"argv": null,
"cwd": null,
"env_keys": []
},
"email": {
"from": null,
"to": [],
"cc": [],
"bcc": [],
"reply_to": null,
"subject": "",
"date": null,
"body": "",
"body_html": null,
"attachments": [],
"in_reply_to": null
}
}
],
"options": [
{
"outcome": "approve"
}
],
"on_timeout": "deny",
"status": "pending",
"decision": {
"outcome": "approve"
}
}

Not pending