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

# List collections

Returns all collections in the knowledge base, optionally filtered by parent collection. Collections are returned in sort order. When parent\_id is provided, only direct children of that collection are returned. Without parent\_id, all collections across all levels are returned. Collections organize articles into hierarchical categories for better content organization and navigation.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json get /knowledge/collections
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /knowledge/collections:
    get:
      tags:
        - Knowledge Collections
      summary: List collections
      description: >-
        Returns all collections in the knowledge base, optionally filtered by
        parent collection. Collections are returned in sort order. When
        parent_id is provided, only direct children of that collection are
        returned. Without parent_id, all collections across all levels are
        returned. Collections organize articles into hierarchical categories for
        better content organization and navigation.
      operationId: listCollections
      parameters:
        - name: parent_id
          in: query
          required: false
          schema:
            type: integer
            nullable: true
          description: >-
            Filter collections by parent ID. Omit to get all collections, or
            provide a collection ID to get its children, or null to get
            root-level collections.
      responses:
        '200':
          description: Collections retrieved successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Collection'
components:
  schemas:
    Collection:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the collection.
        parent_id:
          type: integer
          nullable: true
          description: >-
            ID of the parent collection for nested organization (null for
            root-level collections).
        title:
          type: string
          maxLength: 250
          description: Display title of the collection shown in navigation and headers.
          example: Getting Started
        slug:
          type: string
          maxLength: 250
          pattern: ^[a-z0-9_-]+$
          description: URL-safe slug used in the collection's URL path.
          example: getting-started
        description:
          type: string
          nullable: true
          description: Description of the collection content and purpose.
          example: Essential guides to help you get started with our platform
        seo_title:
          type: string
          maxLength: 250
          description: SEO-optimized title for search engines and meta tags.
          example: Getting Started - Complete Guide
        seo_description:
          type: string
          maxLength: 250
          nullable: true
          description: >-
            SEO-optimized description for search engines and social media
            previews.
        icon:
          type: string
          maxLength: 25
          nullable: true
          description: >-
            Emoji icon identifier displayed alongside the collection title for
            visual distinction.
          example: 🚀
        get_icon_color:
          type: string
          nullable: true
          description: >-
            Computed color code associated with the emoji icon for theming
            purposes.
        created:
          type: string
          format: date-time
          description: Timestamp when the collection was created.
        last_updated:
          type: string
          format: date-time
          description: Timestamp when the collection was last modified.
        get_articles:
          type: array
          items:
            type: integer
          description: >-
            Array of article IDs contained directly in this collection (not
            including nested collections).
          example:
            - 12
            - 45
            - 67
        get_collections:
          type: array
          items:
            type: integer
          description: Array of sub-collection IDs that are children of this collection.
          example:
            - 3
            - 8
            - 15
        sort:
          type: integer
          description: Sort order within the parent collection or at root level.
          example: 2
      x-computed-hash: 680b3b52d5771752ebd9584afb952bc5efa4006ed32d920a58071bf37479d4fb
      x-last-modified: 1769075325
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````