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

# Get Folders

> Get folder details. If id or name is provided, returns a single folder object. Otherwise, lists sub-folders under the parentFolderId (or root).



## OpenAPI

````yaml /public-apis/openapi/folders.json get /v1/folders
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - folders
  description: API documentation for Maxim SDK folders endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/folders:
    get:
      tags:
        - Folder
      summary: Get Folders
      description: >-
        Get folder details. If id or name is provided, returns a single folder
        object. Otherwise, lists sub-folders under the parentFolderId (or root).
      parameters:
        - schema:
            type: string
            description: Unique identifier for the folder
          required: false
          name: id
          in: query
        - schema:
            type: string
            description: Name of the folder
          required: false
          name: name
          in: query
        - schema:
            type: string
            description: Unique identifier for the workspace
          required: true
          name: workspaceId
          in: query
        - schema:
            type: string
            nullable: true
            description: ID of the parent folder to filter by
          required: false
          name: parentFolderId
          in: query
        - schema:
            type: string
            description: >-
              Name of the parent folder to filter by (alternative to
              parentFolderId)
          required: false
          name: parentFolderName
          in: query
        - schema:
            type: string
            enum:
              - WORKFLOW
              - PROMPT_CHAIN
              - DATASET
              - PROMPT
              - CONTEXT_SOURCE
              - PROMPT_COMPARISONS
              - LOG_REPOSITORY
              - PROMPT_TOOL
              - EVALUATOR
          required: true
          name: entityType
          in: query
        - schema:
            type: number
            nullable: true
            maximum: 100
            default: 20
            description: 'Maximum number of records to return (max: 100)'
          required: false
          name: limit
          in: query
        - schema:
            type: string
            nullable: true
            description: Cursor for pagination
          required: false
          name: cursor
          in: query
      responses:
        '200':
          description: Folders retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - $ref: '#/components/schemas/Folder'
                      - type: array
                        items:
                          $ref: '#/components/schemas/Folder'
                    description: >-
                      Single Folder object if fetching by id/name, array of
                      Folders if listing.
                  pagination:
                    type: object
                    properties:
                      nextCursor:
                        type: string
                        nullable: true
                      hasMore:
                        type: boolean
                    required:
                      - hasMore
                required:
                  - data
        '400':
          description: Invalid request parameters
        '404':
          description: Folder not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Folder:
      type: object
      properties:
        id:
          type: string
        workspaceId:
          type: string
        name:
          type: string
        entityType:
          type: string
          enum:
            - WORKFLOW
            - WORKFLOW_SIMULATION
            - PROMPT_CHAIN
            - DATASET
            - DATASET_SPLIT
            - PROMPT
            - DATASOURCE
            - PROMPT_EXPERIMENT
            - LOG_REPOSITORY
            - PROMPT_TOOL
            - EVALUATOR
            - SDK
            - TEST_RUN
            - RUN_REPORT
        parentId:
          type: string
          nullable: true
        config:
          nullable: true
        createdAt:
          type: string
        updatedAt:
          type: string
        type:
          type: string
          enum:
            - FOLDER
      required:
        - id
        - workspaceId
        - name
        - entityType
        - parentId
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````