Skip to main content
v1

Open an interactive WebSocket terminal session.

GET /v1/processes/{id}/terminal/ws: request parameters and responses.

GET /v1/processes/{id}/terminal/ws

Upgrades the connection to a WebSocket for bidirectional PTY I/O. Accepts access_token query param for browser-based auth (WebSocket API cannot send custom headers). Streams raw PTY output as binary frames and accepts JSON control frames for input, resize, and close.

Parameters

NameInRequiredTypeDescription
idpathYesstringProcess ID
access_tokenqueryNostringBearer token alternative for WS auth

Parameter schemas

[
  {
    "name": "id",
    "in": "path",
    "description": "Process ID",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "name": "access_token",
    "in": "query",
    "description": "Bearer token alternative for WS auth",
    "required": false,
    "schema": {
      "type": "string",
      "nullable": true
    }
  }
]

Responses

101

WebSocket upgraded

400

Invalid websocket frame or upgrade request

Content type: application/json

{
  "schema": {
    "$ref": "#/components/schemas/ProblemDetails"
  }
}

Related schemas: ProblemDetails.

404

Unknown process

Content type: application/json

{
  "schema": {
    "$ref": "#/components/schemas/ProblemDetails"
  }
}

Related schemas: ProblemDetails.

409

Not a terminal process

Content type: application/json

{
  "schema": {
    "$ref": "#/components/schemas/ProblemDetails"
  }
}

Related schemas: ProblemDetails.

501

Process API unsupported on this platform

Content type: application/json

{
  "schema": {
    "$ref": "#/components/schemas/ProblemDetails"
  }
}

Related schemas: ProblemDetails.