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).

当前语言暂无代码示例

参数

FieldTypeReqDefaultDescription
idstringY

请求体

FieldTypeReqDefaultDescription
reasonstringYHuman-readable cancellation reason (recorded in task log).

响应示例

{
  "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