> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update PTY session

> Update properties of an existing pseudo-terminal (PTY) session.



## OpenAPI

````yaml /openapi.json put /pty/{ptyID}
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /pty/{ptyID}:
    put:
      summary: Update PTY session
      description: Update properties of an existing pseudo-terminal (PTY) session.
      operationId: pty.update
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
        - in: path
          name: ptyID
          schema:
            type: string
            pattern: ^pty.*
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                size:
                  type: object
                  properties:
                    rows:
                      type: number
                    cols:
                      type: number
                  required:
                    - rows
                    - cols
      responses:
        '200':
          description: Updated session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pty'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.pty.update({
              ...
            })
components:
  schemas:
    Pty:
      type: object
      properties:
        id:
          type: string
          pattern: ^pty.*
        title:
          type: string
        command:
          type: string
        args:
          type: array
          items:
            type: string
        cwd:
          type: string
        status:
          type: string
          enum:
            - running
            - exited
        pid:
          type: number
      required:
        - id
        - title
        - command
        - args
        - cwd
        - status
        - pid
    BadRequestError:
      type: object
      properties:
        data: {}
        errors:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        success:
          type: boolean
          const: false
      required:
        - data
        - errors
        - success

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.