Skip to main content
POST
/
v1
/
sandboxes
/
{id}
/
pty
/
{sid}
/
resize
Resize a PTY session
import requests

url = "https://api.13-215-85-171.sslip.io/v1/sandboxes/{id}/pty/{sid}/resize"

payload = {
    "cols": 2,
    "rows": 2
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "error": "<string>",
  "error_detail": {
    "message": "<string>",
    "retryable": true,
    "suggested_action": "<string>",
    "step_index": 123,
    "attempt": 123,
    "max_attempts": 123,
    "cache_subject": "<string>",
    "build_id": "<string>",
    "request_id": "<string>",
    "details": {}
  },
  "request_id": "<string>",
  "build_id": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Sandbox ID (e.g. sb_a1b2c3d4)

sid
string
required

PTY session ID

Body

application/json
cols
integer<uint16>
required
Required range: x >= 1
rows
integer<uint16>
required
Required range: x >= 1

Response

Session resized