> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplesandbox.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Post apiv1sandboxes terminals



## OpenAPI

````yaml https://api.simplesandbox.dev/doc post /api/v1/sandboxes/{id}/terminals
openapi: 3.0.0
info:
  version: 1.0.0
  title: Sandbox API
servers: []
security: []
paths:
  /api/v1/sandboxes/{id}/terminals:
    post:
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TerminalCreateRequest'
      responses:
        '201':
          description: Terminal created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminalCreateResponse'
        '401':
          description: Unauthorized
        '404':
          description: Sandbox not found
        '503':
          description: Daemon not available
components:
  schemas:
    TerminalCreateRequest:
      type: object
      properties:
        shell:
          type: string
          enum:
            - bash
            - zsh
            - fish
            - sh
          example: bash
          description: Shell to use for the terminal session
        cwd:
          type: string
          example: /app
          description: Working directory for the terminal session
        cols:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          example: 80
          description: Terminal width in columns
        rows:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          example: 24
          description: Terminal height in rows
    TerminalCreateResponse:
      type: object
      properties:
        terminal:
          $ref: '#/components/schemas/Terminal'
        wsUrl:
          type: string
          example: >-
            wss://api.simplesandbox.dev/api/v1/sandboxes/e7847229c547d8/terminals/1234/ws
          description: WebSocket URL for connecting to the terminal
      required:
        - terminal
        - wsUrl
    Terminal:
      type: object
      properties:
        id:
          type: string
          example: '1234'
        sandboxId:
          type: string
          example: e7847229c547d8
        shell:
          type: string
          example: bash
        status:
          type: string
          example: active
        createdAt:
          type: string
          example: '2025-11-06T10:30:00Z'
      required:
        - id
        - sandboxId
        - shell
        - status
        - createdAt

````