Skip to main content
POST
/
process.Process
/
Start
Start
curl --request POST \
  --url https://{port}-{sandboxID}.e2b.app/process.Process/Start \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/connect+json' \
  --header 'X-Access-Token: <api-key>' \
  --data '
{
  "process": {
    "cmd": "<string>",
    "args": [
      "<string>"
    ],
    "envs": {},
    "cwd": "<string>"
  },
  "pty": {
    "size": {
      "cols": 123,
      "rows": 123
    }
  },
  "tag": "<string>",
  "stdin": true
}
'
{
  "event": {
    "data": {
      "pty": "aSDinaTvuI8gbWludGxpZnk="
    }
  }
}

Authorizations

X-Access-Token
string
header
required

Sandbox access token (envdAccessToken) for authenticating requests to a running sandbox. Returned by: POST /sandboxes (on create), POST /sandboxes/{sandboxID}/connect (on connect), POST /sandboxes/{sandboxID}/resume (on resume), and GET /sandboxes/{sandboxID} (for running or paused sandboxes).

Authorization
string
header
required

Optional system user for the operation. Sets file ownership and resolves relative paths. Pass the desired username with no password. Defaults to the sandbox's default user when omitted.

Headers

Connect-Protocol-Version
number
required

Define the version of the Connect protocol

Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/connect+json
process
process · object
pty
PTY · object
tag
string | null
stdin
boolean | null

This is optional for backwards compatibility. We default to true. New SDK versions will set this to false by default.

Response

Stream of StartResponse events

event
event · object