Policys

Update Policy

Update policy

post
/v1/policy/{id}/update

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

idstring* Required

The ID of the policy to update

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.update(

id,
{
"name":"string",
"description":"string",
"meta":"object",
"blueprintId":"string",
"type":"string",
"config":"object"
}
)
{
"id":"string"
}
The policy was updated successfully