Policys

Update Policy

Update policy

post
/v1/policy/{policyId}/update

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

policyIdstring* Required

The ID of the policy to update

Request Body * Required

Request Body Schema: application/json

aliasstring

The unique alias for the instance

namestring

The associated name

descriptionstring

The associated description

metaobject

Meta data information

blueprintIdstring

The ID of the blueprint

botIdstring

The ID of the bot this policy applies to. When omitted the policy is global and applies to every bot.

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(

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