Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Update PTY session

Update the title or viewport size of one PTY session.

PUT/api/pty/{ptyID}
Path parameters
ptyIDobjectrequired
Query parameters
locationobject | any
Request body
requiredapplication/json
titlestring
sizeobject
Show properties
rowsobjectrequired
Show properties
object
colsobjectrequired
Show properties
object
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataPtyrequired
Show properties
idobjectrequired
Show properties
object
titlestringrequired
commandstringrequired
argsstring[]required
cwdstringrequired
statusstringrequired
Allowed:runningexited
pidobjectrequired
Show properties
object
exitCodeobject
Show properties
object
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
404PtyNotFoundError
_tagstringrequired
Allowed:PtyNotFoundError
ptyIDstringrequired
messagestringrequired
Request
curl -X PUT "/api/pty/%5Bobject%20Object%5D" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "size": {
    "rows": {},
    "cols": {}
  }
}'
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": {
    "id": {},
    "title": "string",
    "command": "string",
    "args": [
      "string"
    ],
    "cwd": "string",
    "status": "running",
    "pid": {},
    "exitCode": {}
  }
}