Secrets

Create Secret

Create secret

post
/v1/secret/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

kindstring

The kind of the secret

typestring

The type of the secret

valuestring

The value of the secret

configstring

The config of the secret

visibilitystring

The visibility of the secret

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.secret.create(

{
"name":"string",
"description":"string",
"meta":"object",
"kind":"string",
"type":"string",
"value":"string",
"config":"string",
"visibility":"string"
}
)
{
"id":"string"
}
The secret was created successfully