Space Storages
Delete Space Storage Path
Delete a file or directory from space storage
post
/v1/space/{spaceId}/storage/delete/{path}
Description
Delete a file or directory from space storage. The path is specified in the URL after /delete/. If recursive is true and the path is a directory, all files within it will be deleted.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
spaceIdstring* Required
The ID of the space
pathstring* Required
The file or directory path
Request Body
Request Body Schema: application/json
recursiveboolean
Whether to delete directory contents recursively
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.space.storage.delete(
spaceId, path,{)}"recursive":"boolean"
{"path":"string"}The file or directory was deleted successfully