---
title: "Write a file to a computer"
method: POST
path: "/computer/{computerId}/file/write"
tags: ["Computer"]
---

# Write a file to a computer

`POST /computer/{computerId}/file/write`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/computer/{computerId}/file/write`
- Auth: HTTP bearer

## Path parameters

- `computerId` string, required: The ID of the computer

## Request body

- object
  - `path` string, required: The absolute path of the file on the computer
  - `contents` string, required: The text contents to write (max 3 MB)

## Response `200`

The file was written

- object
  - `path` string, required: The path of the file

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
