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

# Check if a file exists



## OpenAPI

````yaml /api-reference/openapi.json get /v1/volumes/{id}/files/exists
openapi: 3.1.0
info:
  title: microsandbox cloud API
  description: >-
    REST API for microsandbox cloud operations authenticated with an
    organization API key.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - api_key: []
paths:
  /v1/volumes/{id}/files/exists:
    get:
      tags:
        - Volumes
      summary: Check if a file exists
      operationId: exists
      parameters:
        - name: id
          in: path
          description: Volume UUID
          required: true
          schema:
            type: string
            format: uuid
        - name: x-msb-file-path
          in: header
          description: URL-safe base64 encoded volume-relative UTF-8 path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Check if a file exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeFileExistsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: invalid request
                  details: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_api_key
                  message: unauthorized
                  details: null
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Volume or path not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: sandbox_not_found
                  message: resource not found
                  details: null
        '502':
          description: Volume filesystem unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: orchestrator_unreachable
                  message: orchestrator unreachable
                  details: null
      security:
        - api_key: []
components:
  schemas:
    VolumeFileExistsResponse:
      type: object
      description: Whether the requested path exists.
      required:
        - exists
      properties:
        exists:
          type: boolean
    ErrorResponse:
      type: object
      description: Error envelope returned by every non-2xx response.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code, e.g. `invalid_api_key`.
            message:
              type: string
              description: Human-readable description of the error.
            details:
              type:
                - object
                - 'null'
              description: Optional structured context for the error.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: Organization API key (msb_…) - org-scoped programmatic access.

````