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

FieldTypeReqDefaultDescription
idstringY

Request Body

FieldTypeReqDefaultDescription
reasonstringYHuman-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