Space Storages

Upload Space Storage Path

Upload a file to space storage

post
/v1/space/{spaceId}/storage/upload/{path}

Description

Upload a file to space storage. The file path is specified in the URL after /upload/. The file can be specified either as a HTTP URL, a data URL, a multipart/form-data, or as a raw file stream. The maximum file size for uploads is determined dynamically based on user limits and configuration, and may vary.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

spaceIdstring* Required

pathstring* Required

The file path

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.space.storage.upload(

spaceId, path,
""
)
{
"id":"string",
"path":"string",
"uploadRequest":{
"method":"string",
"url":"string",
"headers":"object"
}
}
The file was uploaded successfully