Tasks
Cancel Task Execution
Cancel a task execution
post
/v1/task/{taskId}/execution/{taskExecutionId}/cancel
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
taskIdstring* Required
The ID of the task
taskExecutionIdstring* Required
The ID of the task execution to cancel
Request Body * Required
Request Body Schema: application/json
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.task.execution.cancel(
taskId, taskExecutionId,{})
{"id":"string","taskId":"string"}The task execution was canceled successfully