---
title: "Run a command on a computer"
method: POST
path: "/computer/{computerId}/exec"
tags: ["Computer"]
---

# Run a command on a computer

`POST /computer/{computerId}/exec`

## Request

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

## Path parameters

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

## Request body

- object
  - `command` string, required: The shell command to run
  - `timeout` integer: The timeout in milliseconds (max 300000)

## Response `200`

The command ran

- object
  - `exitCode` integer, required: The exit code of the command
  - `stdout` string, required: The standard output of the command
  - `stderr` string, required: The standard error of the command

## 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)
