Files

Create File

Create file

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

visibilitystring

The file visibility

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.file.create(

{
"name":"string",
"description":"string",
"meta":"object",
"visibility":"string"
}
)
{
"id":"string"
}
The file was created successfully