Skip to main content
POST
Run a command

Authorizations

Authorization
string
header
required

An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.

Path Parameters

id
string
required
Pattern: ^sbx_[a-z2-7]{16}$

Body

application/json
command
string

Shell command, run with bash -lc

Maximum string length: 16384
argv
string[]

Program and arguments; ignored when command is set

cwd
string

Working directory (default /workspace)

env
string[]

KEY=VALUE entries added to the command's environment, not a replacement for it: the defaults (PATH, HOME, LANG; the CA bundle variables behind the egress proxy), then the sandbox's environment variables and secrets, then these. On a clash these win.

stdin
string
Maximum string length: 1048576
timeout_ms
integer
Required range: 0 <= x <= 55000

Response

The command ran (any exit code)

exit_code
integer
required

-1 when killed by a signal

duration_ms
integer
required
stdout
string
required
stderr
string
required
signal
string
timed_out
boolean
oom_killed
boolean
peak_rss_mb
number
stdout_truncated
boolean
stderr_truncated
boolean