Dataset Files

Attach Dataset File

Attach dataset file

post
/v1/dataset/{datasetId}/file/{fileId}/attach

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

datasetIdstring* Required

The ID of the dataset

fileIdstring* Required

The ID of the file

Request Body * Required

Request Body Schema: application/json

typestring

The dataset file attachment type

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.dataset.file.attach(

datasetId, fileId,
{
"type":"string"
}
)
{
"id":"string"
}
The dataset file that was attached successfully