Skip to main content
POST
Execute a command in the machine

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Machine ID (e.g. mch_a1b2c3d4)

Body

application/json
command
string
required
args
string[]
timeout_secs
integer
default:30
Required range: x >= 1
cwd
string

Optional command working directory. Use an absolute machine path such as /workspace/project, /tmp/project, /data/project, or /context/demo where present. Values are normalized before execution, must resolve to an existing directory in the running machine, and may not target reserved runtime paths under /workspace/.nullspace. This affects command execution only and does not limit general filesystem paths.

envs
object
shell
boolean
default:false
background
boolean
default:false

Response

Command completed

exit_code
integer
required
stdout
string
required
stderr
string
required
pid
integer<uint32> | null

Process ID when the command response includes process metadata.