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

# List Files and Directories

> Getting all your files and directories in the given directory



## OpenAPI

````yaml /openapi.yaml get /files
openapi: 3.1.1
info:
  title: MijnKlantportaal API
  version: v1
servers:
  - url: https://api.mijnklantportaal.nl/v1
security:
  - APIKey: []
tags:
  - name: Agreements API
  - name: Appointments API
  - name: Customers API
  - name: Customer Groups API
  - name: Customer Invoices API
  - name: Customer Offers API
  - name: Customer Subscriptions API
  - name: Customer Subscription Packages API
  - name: Files API
  - name: File Request API
  - name: File Share API
  - name: Invoices API
  - name: Payment Links API
  - name: Punch Cards API
  - name: Tickets API
  - name: Webhooks API
paths:
  /files:
    get:
      tags:
        - Files API
      summary: List Files and Directories
      description: Getting all your files and directories in the given directory
      operationId: list-files
      parameters:
        - name: directory
          in: query
          description: ID of the directory to get the files and directories from.
          required: false
          schema:
            type: string
            example: fsd_abc12345678
      responses:
        '200':
          description: A non-paginated response with files and directories
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of Payment Link objects
                    items:
                      $ref: '#/components/schemas/FileOrDirectory'
components:
  schemas:
    FileOrDirectory:
      type: object
      description: File or Directory
      properties:
        id:
          type: string
          example: fsf_abc12345678
          description: >-
            ID of the file or directory. Files are starting with `fsf_`,
            directories with `fsd_`.
        type:
          type: string
          example: file
          description: Type of this content item. Can be `file` or `directory`.
        name:
          type: string
          example: contract_v2.pdf
          description: Name of the file or directory
        size:
          type: integer
          nullable: true
          example: 1284
          description: Size of the file in bytes. Will be `null` for directories.
        mime:
          type: string
          nullable: true
          example: application/pdf
          description: The mime-type of the file. Will be `null` for directories.
        fileShareId:
          type: string
          nullable: true
          example: fss_abc12345678
          description: ID of the Share this file or directory is shared in, if shared.
        createdAt:
          type: string
          example: '2024-04-29T21:00:00+02:00'
          description: >-
            Date and time when the payment link was created. Written in ATOM
            format.
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````