---
title: "List Folder Entities"
method: GET
path: "/api/public/v2/folders/entities"
tags: ["folders"]
---

# List Folder Entities

`GET /api/public/v2/folders/entities`

## Query parameters

- `workspace_id` integer, required — The ID of the workspace to list entities from.
- `folder_id` integer — The ID of the folder to list entities from. If not provided, lists entities at the workspace root level.
- `filter_type` union — Filter entities by type. Can be a single type or a list of types. If not provided, all entity types are returned.
  - 'FOLDER' | 'PROMPT' | 'SNIPPET' | 'WORKFLOW' | 'DATASET' | 'REPORT' | 'AB_TEST' | 'INPUT_VARIABLE_SET'
  - string[]
- `search_query` string — Search entities by name (case-insensitive partial match).
- `flatten` boolean — When true, returns all entities recursively within the folder hierarchy instead of only direct children.
- `include_metadata` boolean — When true, includes type-specific metadata for each entity (e.g., prompt type, latest version number).
- `created_by_email` string
- `created_after` string, date-time
- `created_before` string, date-time
- `updated_after` string, date-time
- `updated_before` string, date-time
- `external_source` string
- `external_id` string
- `sort_by` 'created_at' | 'updated_at' | 'name' | 'id'
- `sort_order` 'asc' | 'desc'
- `tags` union
  - string
  - string[]
- `semantic_search` boolean
- `semantic_search_top_k` integer
- `semantic_search_threshold` number

## Response `200`

Successful Response

- ListFolderEntitiesResponse
  - `entities` FolderEntity[] — List of entities matching the query.
    - `id` integer, required — Unique identifier for the entity
    - `name` string, required — Name of the entity
    - `type` 'FOLDER' | 'PROMPT' | 'SNIPPET' | 'WORKFLOW' | 'DATASET' | 'REPORT' | 'AB_TEST' | 'INPUT_VARIABLE_SET', required — The type of entity. SNIPPET is a pseudo-entity type representing completion-type prompts.
    - `created_at` string, date-time, nullable — Timestamp when the entity was created
    - `updated_at` string, date-time, nullable — Timestamp when the entity was last updated
    - `folder_id` integer, nullable — ID of the folder containing this entity. Null for root-level entities.
    - `path` string[], required — Array of folder names representing the entity's location in the folder hierarchy.
    - `metadata` union — Type-specific metadata. Included only when include_metadata=true.
      - PromptEntityMetadata
        - `type` 'chat' | 'completion', nullable — The prompt template type.
        - `latest_version_number` integer, nullable — The latest version number of the prompt.
      - WorkflowEntityMetadata
        - `latest_version_number` integer, nullable — The latest version number of the workflow.
      - DatasetEntityMetadata
        - `isDraft` boolean — Whether the dataset group only has draft versions (no published versions).
        - `latest_version_number` integer, nullable — The latest published version number of the dataset.
      - object
    - `external_ids` ExternalId[] — External ID mappings attached to this entity.
      - `source` string, required — The external system or namespace that owns the ID.
      - `external_id` string, required — The identifier for this entity in the external system.

## Other responses

- `400` — Bad request - Missing or invalid workspace_id
- `401` — Unauthorized - missing or invalid API key.
- `404` — Folder not found
- `422` — Validation error - request parameters or body are invalid.

---

[API](https://skmtc.net/promptlayer/apis/promptlayer-api.md) · [All operations](https://skmtc.net/promptlayer/apis/promptlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/promptlayer/promptlayer-api/versions/a23093a0a506/schema)
