Tasks

Cancel Task

Cancel a running task

post
/v1/task/{taskId}/cancel

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

taskIdstring* Required

The ID of the task 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.cancel(

taskId,
{}
)
{
"id":"string"
}
The task was canceled successfully