Users
Create User Context
Create user context
post
/v1/user/{userId}/context/create
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
userIdstring* Required
The ID of the user
Request Body * Required
Request Body Schema: application/json
namestring
The associated name
descriptionstring
The associated description
metaobject
Meta data information
payloadobject
Context payload
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.user.context.create(
userId,{)"name":"string","description":"string","meta":"object",}"payload":"object"
{"name":"string","description":"string","meta":"object","id":"string","createdAt":"number","updatedAt":"number","blueprintId":"string","botId":"string","datasetId":"string","skillsetId":"string","contactId":"string","payload":"object"}The user context was created successfully