Skip to main content
POST
/
api
/
v1
/
sandboxes
/
:id
/
exec
cURL
curl --request POST \
  --url https://api.example.com/api/v1/sandboxes/:id/exec \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": "npm install",
  "options": {
    "background": false
  }
}
'
{
  "stdout": "hello\n",
  "stderr": "",
  "exitCode": 0,
  "success": true
}

Path Parameters

id
string
required
Example:

"e7847229c547d8"

Body

application/json
command
string
required

Command to execute via /bin/sh -c. Supports shell features like pipes, redirects, and variables.

Minimum string length: 1
Example:

"npm install"

options
object

Response

Command executed

stdout
string
required
Example:

"hello\n"

stderr
string
required
Example:

""

exitCode
integer
required
Example:

0

success
boolean
required
Example:

true