Skip to main content
POST
/
api
/
v1
/
sandboxes
/
{id}
/
terminals
cURL
curl --request POST \
  --url https://api.example.com/api/v1/sandboxes/{id}/terminals \
  --header 'Content-Type: application/json' \
  --data '
{
  "shell": "bash",
  "cwd": "/app",
  "cols": 80,
  "rows": 24
}
'
{
  "terminal": {
    "id": "1234",
    "sandboxId": "e7847229c547d8",
    "shell": "bash",
    "status": "active",
    "createdAt": "2025-11-06T10:30:00Z"
  },
  "wsUrl": "wss://api.simplesandbox.dev/api/v1/sandboxes/e7847229c547d8/terminals/1234/ws"
}

Path Parameters

id
string
required

Body

application/json
shell
enum<string>

Shell to use for the terminal session

Available options:
bash,
zsh,
fish,
sh
Example:

"bash"

cwd
string

Working directory for the terminal session

Example:

"/app"

cols
integer

Terminal width in columns

Required range: x > 0
Example:

80

rows
integer

Terminal height in rows

Required range: x > 0
Example:

24

Response

Terminal created

terminal
object
required
wsUrl
string
required

WebSocket URL for connecting to the terminal

Example:

"wss://api.simplesandbox.dev/api/v1/sandboxes/e7847229c547d8/terminals/1234/ws"