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

# Get collection tree with articles of a help center



## OpenAPI

````yaml get /collections/tree
openapi: 3.0.0
info:
  title: Thena Help Center API Documentation
  description: The Thena Help Center API description
  version: '1.0'
  contact: {}
servers:
  - url: https://helpcenter.thena.ai
    description: Production
security:
  - ApiKey: []
    base-access: []
    OrgId: []
    UserId: []
tags: []
paths:
  /collections/tree:
    get:
      tags:
        - Collection
      summary: Get collection tree with articles of a help center
      operationId: CollectionController_getTree
      parameters:
        - name: helpCenterId
          required: true
          in: query
          description: Help Center ID
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
      responses:
        '200':
          description: Collections fetched successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCollectionTreeResponse'
        '500':
          description: Failed to fetch collection.
          content:
            application/json:
              schema:
                example:
                  message: Failed to fetch collection.
                  error: API Error
                  statusCode: 500
components:
  schemas:
    GetCollectionTreeResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CollectionTreeDto'
        message:
          type: string
          example: Collections fetched successfully.
      required:
        - data
        - message
    CollectionTreeDto:
      type: object
      properties:
        _id:
          type: string
          example: 682c334124b3b0d0d29b3c17
        name:
          type: string
          example: How to setup Thena
        slug:
          type: string
          example: 8805124718-how-to-setup-thena
        parentId:
          type: string
          example: null
        order:
          type: number
          example: 0
        icon:
          type: string
          example: BookOpenIcon
        description:
          type: string
          example: Learn how to get started with our platform
        isProtected:
          type: boolean
          description: Whether the collection requires authentication to access
          example: false
        depth:
          type: number
          example: 0
          description: Depth level in the collection hierarchy
        articles:
          description: Articles in this collection
          items:
            type: array
          type: array
        childCollection:
          type: array
          description: Child collections within this collection
          items:
            type: object
            description: Child collection
            example:
              _id: 682c334124b3b0d0d29b3c18
              name: Getting Started
              slug: getting-started
              parentId: 682c334124b3b0d0d29b3c17
              order: 0
              icon: BookOpenIcon
              description: Learn how to get started
              depth: 1
              articles: []
              childCollection: []
      required:
        - _id
        - name
        - slug
        - order
        - articles
        - childCollection
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Enter your API key

````