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

# List Template Folders

> Returns the workspace's template folders that the key's user can see. **Not paginated**: one call returns all matching folders. Archived folders are hidden unless you ask for them.

The key acts as its user (the key's default user, or `x-client-user`). A folder is returned only if that user created it, or if it (or any folder nested under it) holds a template the user can see under the same rules as **List Templates**.

Use it to resolve `WorkspaceChecklist.FolderId` on **List Templates** rows to a folder name, or pass a folder `id` as that endpoint's `folderId` to list the templates in it.

Boolean query parameters accept `true`/`false` (or `1`/`0`); any other value is read as `false`.



## OpenAPI

````yaml GET /api/v1/ops/workspaces/{workspaceId}/folders
openapi: 3.1.0
info:
  title: Xenia Team API - List Template Folders
  version: 1.0.0
  description: Lists the workspace's template folders that the key's user can see.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/folders:
    get:
      tags:
        - Templates
      summary: List Template Folders
      description: >-
        Returns the workspace's template folders that the key's user can see.
        **Not paginated**: one call returns all matching folders. Archived
        folders are hidden unless you ask for them.


        The key acts as its user (the key's default user, or `x-client-user`). A
        folder is returned only if that user created it, or if it (or any folder
        nested under it) holds a template the user can see under the same rules
        as **List Templates**.


        Use it to resolve `WorkspaceChecklist.FolderId` on **List Templates**
        rows to a folder name, or pass a folder `id` as that endpoint's
        `folderId` to list the templates in it.


        Boolean query parameters accept `true`/`false` (or `1`/`0`); any other
        value is read as `false`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: >-
            UUID of the workspace. Must be the workspace the API key belongs to.
            Only this workspace-in-path form is open to API keys.
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
        - name: archived
          in: query
          required: false
          description: >-
            `true` returns only archived folders. Default `false` (only active
            folders).
          schema:
            type: boolean
            default: false
        - name: parentId
          in: query
          required: false
          description: >-
            A folder UUID returns only the folders directly inside that folder.
            `root` returns only top-level folders. Omit it to get every folder
            at every level in one flat list.
          schema:
            type: string
            example: root
        - name: orderBy
          in: query
          required: false
          description: >-
            Folder field to sort by: `title` or `createdAt`. Default
            `createdAt`.
          schema:
            type: string
            enum:
              - title
              - createdAt
            default: createdAt
            example: title
        - name: orderDirection
          in: query
          required: false
          description: '`ASC` or `DESC`, case-insensitive. Default `DESC`.'
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
      responses:
        '200':
          description: >-
            Folders retrieved. `meta` is empty: the list is not paginated.


            Each row is the folder plus two computed fields: `path` lists the
            folder's ancestors from the top level down (empty for a top-level
            folder; the folder itself is not included), and `itemsCount` is the
            number of templates the user can see directly in the folder plus the
            number of visible folders directly inside it. `ParentId` is `null`
            for a top-level folder.
          content:
            application/json:
              example:
                data:
                  - id: 5e8a7c21-3b94-4d1f-8c6e-0a2b9f4d7e13
                    WorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                    title: Opening Procedures
                    titleSnippetId: null
                    meta: {}
                    CreatedBy: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                    UpdatedBy: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                    archivedAt: null
                    ParentId: a41f2c6d-9e07-4b38-8d15-6c3e0f7b2a94
                    createdAt: '2026-11-18T10:12:44.210Z'
                    updatedAt: '2026-11-18T10:12:44.210Z'
                    deletedAt: null
                    Creator:
                      id: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                      firstName: Dana
                      lastName: Reyes
                      fullName: Dana Reyes
                    path:
                      - id: a41f2c6d-9e07-4b38-8d15-6c3e0f7b2a94
                        title: Store Operations
                        parentId: null
                    itemsCount: 4
                meta: {}
        '401':
          description: >-
            Unauthorized - `Invalid client credentials`, or `Client does not
            belong to this workspace` when `workspaceId` is not the key's
            workspace.
        '403':
          description: >-
            Forbidden - `API key not authorized for this route`: the path is not
            the workspace-in-path form. Only the folder list is open to API
            keys.
        '422':
          description: Unprocessable Entity - Invalid `orderBy` or `orderDirection`.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.