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

# Attach a drive to a local path

> Mounts an agent drive using the blfs binary to a local path, optionally mounting a subpath within the drive



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /drives/mount
openapi: 3.0.0
info:
  contact: {}
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  version: 0.0.1
servers:
  - url: https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run
    variables:
      sandbox_id:
        default: unknown
      workspace_id:
        default: unknown
      region:
        default: unknown
security:
  - BearerAuth: []
paths:
  /drives/mount:
    post:
      tags:
        - drive
      summary: Attach a drive to a local path
      description: >-
        Mounts an agent drive using the blfs binary to a local path, optionally
        mounting a subpath within the drive
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DriveMountRequest'
        description: Drive attachment parameters
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriveMountResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    DriveMountRequest:
      properties:
        driveName:
          type: string
        drivePath:
          description: Optional, defaults to "/"
          type: string
        mountPath:
          type: string
        readOnly:
          description: Optional, defaults to false
          type: boolean
      required:
        - driveName
        - mountPath
      type: object
    DriveMountResponse:
      properties:
        driveName:
          type: string
        drivePath:
          type: string
        message:
          type: string
        mountPath:
          type: string
        readOnly:
          type: boolean
        success:
          type: boolean
      type: object
    ErrorResponse:
      properties:
        error:
          example: Error message
          type: string
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````