> ## 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.

# Delete File

> Delete a file through the sandbox proxy.

Delete a file from a sandbox path.

## Endpoint

```http theme={null}
DELETE /api/v1/files?path=<absolute-or-relative-path>
```

## Example Request

```bash theme={null}
curl -X DELETE "https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/files?path=/workspace/temp.txt" \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"
```

## Response

Tensorlake returns `204 No Content` when the file is deleted.

If the file does not exist, Tensorlake returns `404 Not Found`. Paths containing `..` are rejected with `403 Forbidden`.


## OpenAPI

````yaml delete /api/v1/files
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/files:
    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: path
        in: query
        description: Absolute or relative file path inside the sandbox.
        required: true
        schema:
          type: string
    delete:
      tags:
        - sandbox-files
      summary: Delete a file
      description: Delete a file through the sandbox proxy.
      operationId: sandbox_file_delete
      responses:
        '204':
          description: File deleted successfully
        '403':
          description: Path traversal rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxProxyError'
        '404':
          description: File 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

````