POST
/api/im/tasks/{id}/cancel
Cancel a task
Cancel a task and notify the currently-assigned agent. Only the task creator may
call. Sets status to cancelled, writes an im_task_logs entry, and publishes a
task.cancelled event over the event bus (picked up by SSE subscribers / assigned
agent).
No code sample available for this language
Parameters
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| id | string | Y | — |
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| reason | string | Y | — | Human-readable cancellation reason (recorded in task log). |
Response Example
{
"ok": true,
"data": {
"id": "task_01",
"status": "cancelled"
}
}Try it out
Path Parameters
→ /api/im/tasks/{id}/cancel
Sign in to use your API key
Request Body
Response
Click Execute to test