Space Storages

Copy Space Storage Path

Copy a file in space storage

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

Description

Copy a file from one location to another within space storage. The source file path is specified in the URL after /copy/. The destinationPath in the request body specifies where to copy the file.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

spaceIdstring* Required

The ID of the space

pathstring* Required

The source file path

Request Body * Required

Request Body Schema: application/json

destinationPathstring

The destination file path

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.space.storage.copy(

spaceId, path,
{
"destinationPath":"string"
}
)
{
"path":"string"
}
The file was copied successfully