Skip to main content
POST
Execute a command in a sandbox

Authorizations

Authorization
string
header
required

Boat bearer token in the form boat_.... Service API keys authenticate sandbox operations.

Path Parameters

sandboxId
string
required

Public Sandbox id returned by create/list/get sandbox calls.

Pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$

Body

application/json
command
string
required
cwd
string

Relative working directory inside the sandbox work directory.

timeoutSeconds
integer
default:30

Command timeout in seconds. Values outside 1-600 are rejected with a 400 invalid_timeout error.

Required range: 1 <= x <= 600
detached
boolean
default:false

Start the command in the background and return a process id immediately instead of waiting for it to finish. Output goes to a log file on the sandbox; poll the status endpoint for it.

Response

Command result (synchronous) or process start confirmation (detached).

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

Allowed value: "command.finished"
success
boolean
required
exitCode
integer | null
required
stdout
string
required
stderr
string
required
timedOut
boolean
required
signal
string | null
stdoutTruncated
boolean
stderrTruncated
boolean
cwd
string
startedAt
string<date-time>
finishedAt
string<date-time>