Widget Integrations
Attach Widget Integration File
Attach a file to a widget integration
post
/v1/integration/widget/{widgetIntegrationId}/file/{fileId}/attach
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
widgetIntegrationIdstring* Required
The ID of the widget integration
fileIdstring* Required
The ID of the file to attach
Request Body * Required
Request Body Schema: application/json
typestring
The attachment slot type for the file
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.integration.widget.file.attach(
widgetIntegrationId, fileId,{)}"type":"string"
{"id":"string","type":"string","widgetIntegrationId":"string"}The file was attached to the widget integration successfully