Policys
Create Policy
Create policy
post
/v1/policy/create
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
blueprintIdstring
The ID of the blueprint
typestring
The policy type
configobject
The policy configuration as JSON
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.policy.create(
{)"name":"string","description":"string","meta":"object","blueprintId":"string","type":"string",}"config":"object"
{"id":"string"}The policy was created successfully