Tasks

Fetch Task

Fetch task

get
/v1/task/{taskId}/fetch

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

taskIdstring* Required

The ID of the task to retrieve

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.task.fetch(

taskId
)
{
"name":"string",
"description":"string",
"meta":"object",
"id":"string",
"createdAt":"number",
"updatedAt":"number",
"contactId":"string",
"botId":"string",
"schedule":"string"
}
The task was retrieved successfully