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

# Close Ssh Session Endpoint

> Close an SSH session (removes the TCP exposure).

## Rate Limit

20 requests per 60 seconds per IP and token per sandbox.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json delete /api/v1/sandbox/{sandbox_id}/ssh-session/{session_id}
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox/{sandbox_id}/ssh-session/{session_id}:
    delete:
      tags:
        - Sandbox
      summary: Close Ssh Session Endpoint
      description: Close an SSH session (removes the TCP exposure).
      operationId: >-
        close_ssh_session_endpoint_api_v1_sandbox__sandbox_id__ssh_session__session_id__delete
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            title: Sandbox Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnexposePortResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UnexposePortResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
      type: object
      required:
        - success
        - message
      title: UnexposePortResponse
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````