> ## 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.

# Retrieve the complete knowledge base structure

Returns the full hierarchical structure of the knowledge base. Collections are organized in a tree structure where collections can contain articles and nested sub-collections. The structure includes computed URLs for all articles based on their collection path. Note that some collections may have zero articles but serve as parent containers for nested collections.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json get /knowledge/structure
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/structure:
    get:
      tags:
        - Knowledge Base
      summary: Retrieve the complete knowledge base structure
      description: >-
        Returns the full hierarchical structure of the knowledge base.
        Collections are organized in a tree structure where collections can
        contain articles and nested sub-collections. The structure includes
        computed URLs for all articles based on their collection path. Note that
        some collections may have zero articles but serve as parent containers
        for nested collections.
      operationId: getKnowledgeStructure
      responses:
        '200':
          description: Knowledge base structure retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  base_url:
                    type: string
                    description: >-
                      Base URL of the knowledge base (either custom domain or
                      subdomain).
                    example: https://help.piedpiper.com
                  articles:
                    type: object
                    description: >-
                      Map of article IDs to article objects with metadata and
                      computed URLs.
                    additionalProperties:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Unique identifier for the article.
                        title:
                          type: string
                          description: Title of the article.
                        seo_title:
                          type: string
                          description: SEO-optimized title for search engines.
                        uuid:
                          type: string
                          format: uuid
                          description: Unique UUID for the article.
                        slug:
                          type: string
                          description: URL-safe slug for the article.
                        description:
                          type: string
                          nullable: true
                          description: Brief description of the article content.
                        created:
                          type: string
                          format: date-time
                          description: Timestamp when the article was created.
                        last_updated:
                          type: string
                          format: date-time
                          description: Timestamp when the article was last updated.
                        visibility:
                          type: string
                          enum:
                            - public
                            - chat
                            - chat_auth
                          description: Visibility setting for the article.
                        previous_url:
                          type: string
                          nullable: true
                          description: Previous URL if migrated from another system.
                        published:
                          type: boolean
                          description: Whether the article is published.
                        url:
                          type: string
                          description: >-
                            Full computed URL path including collection
                            hierarchy.
                          example: >-
                            https://help.piedpiper.com/getting-started/introduction
                  collections:
                    type: object
                    description: >-
                      Map of collection IDs to collection objects with their
                      articles.
                    additionalProperties:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Unique identifier for the collection.
                        parent_id:
                          type: integer
                          nullable: true
                          description: >-
                            ID of the parent collection, or null for top-level
                            collections.
                        title:
                          type: string
                          description: Title of the collection.
                        slug:
                          type: string
                          description: URL-safe slug for the collection.
                        description:
                          type: string
                          nullable: true
                          description: Description of the collection content.
                        seo_title:
                          type: string
                          description: SEO-optimized title.
                        seo_description:
                          type: string
                          nullable: true
                          description: SEO-optimized description.
                        icon:
                          type: string
                          nullable: true
                          description: Emoji icon identifier for the collection.
                        created:
                          type: string
                          format: date-time
                          description: Timestamp when the collection was created.
                        sort:
                          type: integer
                          description: Sort order within parent collection.
                        articles:
                          type: array
                          items:
                            type: integer
                          description: Array of article IDs contained in this collection.
        '404':
          description: Knowledge base not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  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

````