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

# List folders in a library

> Lists the folders inside a library or folder, with the count and size of the files directly in it. Omit `item_id` for the library root. Admin only.



## OpenAPI

````yaml /api-reference/endpoint/m365/openapi.json get /m365/files/browse/children
openapi: 3.0.3
info:
  title: quiva.ai Microsoft 365 API
  description: >-
    Outlook mail connection, mail filing into space folders, and mail
    automations. All routes act on the caller's own mailbox unless marked admin.
    The `/m365/rules` routes were withdrawn. Files and SharePoint sync routes
    are not part of this spec.
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Mail
    description: The caller's Outlook mailbox connection
  - name: Mail filing
    description: Filing mail from a mailbox into space folders
  - name: Mail automations
    description: Actions that run on each filed message
  - name: Files connection
    description: Connecting a Microsoft 365 tenant for SharePoint files
  - name: SharePoint browse
    description: Browsing sites, libraries and folders with a setup session
  - name: SharePoint sync sources
    description: Syncing a SharePoint library folder into a space
paths:
  /m365/files/browse/children:
    get:
      tags:
        - SharePoint browse
      summary: List folders in a library
      description: >-
        Lists the folders inside a library or folder, with the count and size of
        the files directly in it. Omit `item_id` for the library root. Admin
        only.
      operationId: browseFilesChildren
      parameters:
        - name: setup_session
          in: query
          required: true
          description: Setup session id from the admin sign-in callback
          schema:
            type: string
        - name: drive_id
          in: query
          required: true
          description: Drive id
          schema:
            type: string
        - name: item_id
          in: query
          required: false
          description: Folder item id
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  folders:
                    type: array
                    items:
                      type: object
                  file_count:
                    type: integer
                  file_bytes:
                    type: integer
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Caller is not an account admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.