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

# Folder Details

> Retrieve folder metadata with optional document statistics and projections.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/morphik/openapi.documented.yml post /folders/details
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /folders/details:
    post:
      tags:
        - Folders
      summary: Folder Details
      description: >-
        Retrieve folder metadata with optional document statistics and
        projections.
      operationId: folder_details_folders_details_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FolderDetailsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderDetailsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Morphik from 'morphik';

            const client = new Morphik({
              apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
            });

            const folderDetailsResponse = await client.folders.details();

            console.log(folderDetailsResponse.folders);
        - lang: cURL
          source: |-
            curl https://api.morphik.ai/folders/details \
                -H 'Content-Type: application/json' \
                -H "Authorization: Bearer $MORPHIK_API_KEY" \
                -d '{}'
components:
  schemas:
    FolderDetailsRequest:
      properties:
        identifiers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Identifiers
          description: >-
            List of folder IDs or names. If omitted, returns details for all
            accessible folders.
        include_document_count:
          type: boolean
          title: Include Document Count
          description: Include total document count when true
          default: true
        include_status_counts:
          type: boolean
          title: Include Status Counts
          description: Include document counts grouped by status when true
          default: false
        include_documents:
          type: boolean
          title: Include Documents
          description: Include a paginated list of documents for each folder when true
          default: false
        document_filters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Document Filters
          description: >-
            Optional metadata filters applied when computing folder document
            statistics
        document_skip:
          type: integer
          minimum: 0
          title: Document Skip
          description: >-
            Number of documents to skip within each folder when
            include_documents is true
          default: 0
        document_limit:
          type: integer
          minimum: 0
          title: Document Limit
          description: >-
            Maximum number of documents to return per folder when
            include_documents is true
          default: 25
        document_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Document Fields
          description: >-
            Optional list of fields to project for folder documents (dot
            notation supported)
        sort_by:
          anyOf:
            - type: string
              enum:
                - created_at
                - updated_at
                - filename
                - external_id
            - type: 'null'
          title: Sort By
          description: Field to sort folder documents by when include_documents is true
          default: updated_at
        sort_direction:
          type: string
          enum:
            - asc
            - desc
          title: Sort Direction
          description: Sort direction for folder documents when include_documents is true
          default: desc
      type: object
      title: FolderDetailsRequest
      description: Request model for retrieving folder details with document statistics.
    FolderDetailsResponse:
      properties:
        folders:
          items:
            $ref: '#/components/schemas/FolderDetails'
          type: array
          title: Folders
      type: object
      required:
        - folders
      title: FolderDetailsResponse
      description: Response wrapping folder detail entries.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FolderDetails:
      properties:
        folder:
          $ref: '#/components/schemas/Folder'
        document_info:
          anyOf:
            - $ref: '#/components/schemas/FolderDocumentInfo'
            - type: 'null'
      type: object
      required:
        - folder
      title: FolderDetails
      description: Folder details with optional document summary.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Folder:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        full_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Path
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        depth:
          anyOf:
            - type: integer
            - type: 'null'
          title: Depth
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        document_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Document Ids
        system_metadata:
          additionalProperties: true
          type: object
          title: System Metadata
        summary_storage_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Storage Key
        summary_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Summary Version
        summary_bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Bucket
        summary_updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Updated At
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
        end_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: End User Id
        child_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Child Count
      type: object
      required:
        - name
      title: Folder
      description: Represents a folder that contains documents
    FolderDocumentInfo:
      properties:
        documents:
          items: {}
          type: array
          title: Documents
        document_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Document Count
        status_counts:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Status Counts
        skip:
          type: integer
          title: Skip
          default: 0
        limit:
          type: integer
          title: Limit
          default: 0
        returned_count:
          type: integer
          title: Returned Count
          default: 0
        has_more:
          type: boolean
          title: Has More
          default: false
        next_skip:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Skip
      type: object
      title: FolderDocumentInfo
      description: Document summary for a folder.

````