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

# Kill PTY Session

> Terminate a PTY session.

Terminate a PTY session.

## Endpoint

```http theme={null}
DELETE /api/v1/pty/{session_id}
```

## Example Request

```bash theme={null}
curl -X DELETE https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/pty/<session-id> \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"
```

## Response

Tensorlake returns `204 No Content`.

The daemon first sends `SIGHUP` to the PTY session and, if it is still alive after a short grace period, follows up with `SIGKILL`.

If the session does not exist, Tensorlake returns `404 Not Found`.


## OpenAPI

````yaml delete /api/v1/pty/{session_id}
openapi: 3.1.0
info:
  title: Tensorlake API
  description: >-
    Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
    Workflows
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.tensorlake.ai/
security:
  - bearerAuth: []
tags:
  - name: Tensorlake Cloud API
    description: >-
      Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
      Workflows
paths:
  /api/v1/pty/{session_id}:
    servers:
      - url: https://{identifier}.sandbox.tensorlake.ai
        description: >-
          Example sandbox proxy host for a specific running sandbox. For
          programmatic access, use the sandbox's `ingress_endpoint`.
        variables:
          identifier:
            default: example-sandbox
            description: The sandbox ID or sandbox name.
    parameters:
      - name: session_id
        in: path
        description: The PTY session identifier.
        required: true
        schema:
          type: string
    delete:
      tags:
        - sandbox-pty
      summary: Kill a PTY session
      description: Terminate a PTY session.
      operationId: sandbox_pty_kill
      responses:
        '204':
          description: PTY session terminated
        '404':
          description: PTY session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
components:
  schemas:
    SandboxProxyError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````