Tasks

Trigger Task

Trigger a task

post
/v1/task/{taskId}/trigger

Description

Manually trigger a task to execute immediately.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

taskIdstring* Required

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.task.trigger(

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