Tasks
Create Task
Create a new task
post
/v1/task/create
Description
Create a new task with the given parameters.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Request Body * Required
Request Body Schema: application/json
namestring
The associated name
descriptionstring
The associated description
metaobject
Meta data information
contactIdstring
The contact associated with the task
botIdstring
The bot associated with the task
schedulestring
The schedule of the task
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.task.create(
{)"name":"string","description":"string","meta":"object","contactId":"string","botId":"string",}"schedule":"string"
{"id":"string"}
The task was created successfully