Conversation Attachments
Upload Conversation Attachment
Upload a file as a conversation attachment
post
/v1/conversation/{conversationId}/attachment/upload
Description
Upload the specified file to the conversation. The file can be specified either as a HTTP URL, a data URL, a multipart/form-data, or as a raw file stream. There is currently a limit of 4.5MB for files uploaded via all available methods except for direct-to-source uploads when using application/json request body with a file object.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
conversationIdstring* Required
Request Body * Required
Request Body Schema: application/json
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.conversation.attachment.upload(
conversationId,"")
{"id":"string","name":"string","uploadRequest":{"method":"string","url":"string","headers":"object"}}
The file was upload successfully