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

# Get knowledge folder structure with note counts.

> Return the full folder tree with per-folder note counts.

## Permissions

Requires a service user with the `ManageAccountKnowledge` permission at the enterprise level.


## OpenAPI

````yaml /v3-openapi.yaml GET /v3/enterprise/knowledge/folders
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/knowledge/folders:
    get:
      summary: Get knowledge folder structure with note counts.
      description: Return the full folder tree with per-folder note counts.
      operationId: handle_list_folders_v3_enterprise_knowledge_folders_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderTreeResponse'
          description: Successful Response
components:
  schemas:
    FolderTreeResponse:
      description: Response for the folder-structure endpoint.
      properties:
        folders:
          items:
            $ref: '#/components/schemas/FolderSummary'
          title: Folders
          type: array
        root_note_count:
          title: Root Note Count
          type: integer
      required:
        - folders
        - root_note_count
      title: FolderTreeResponse
      type: object
    FolderSummary:
      description: One folder in the knowledge folder tree.
      properties:
        folder_id:
          title: Folder Id
          type: string
        name:
          title: Name
          type: string
        note_count:
          title: Note Count
          type: integer
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
        path:
          title: Path
          type: string
      required:
        - folder_id
        - name
        - path
        - note_count
      title: FolderSummary
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````