Computers
Write Computer File
Write a file to a computer
post
/v1/computer/{computerId}/file/write
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
computerIdstring* Required
The ID of the computer
Request Body * Required
Request Body Schema: application/json
pathstring
The absolute path of the file on the computer
contentsstring
The text contents to write (max 3 MB)
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
token: process.env.CHATBOTKIT_API_TOKEN!
})
const response = await cbk.computer.file.write(
computerId,{)"path":"string",}"contents":"string"
{"path":"string"}The file was written