Skip to main content
GET
/
api
/
public
/
v2
/
folders
/
entities
List Folder Entities
curl --request GET \
  --url https://api.promptlayer.com/api/public/v2/folders/entities \
  --header 'X-API-KEY: <x-api-key>'
{
  "entities": [
    {
      "id": 123,
      "name": "<string>",
      "type": "FOLDER",
      "path": [
        "<string>"
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "folder_id": 123,
      "metadata": {
        "type": "chat",
        "latest_version_number": 123
      }
    }
  ]
}
Lists entities within a folder or at the workspace root. Returns folders, prompts, snippets, workflows, datasets, evaluations, AB tests, and input variable sets. Supports filtering by entity type, searching by name, flattening the folder hierarchy, and optionally including entity metadata.

Headers

X-API-KEY
string
required

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

Filter entities by type. Can be a single type or a list of types. If not provided, all entity types are returned.

Available options:
FOLDER,
PROMPT,
SNIPPET,
WORKFLOW,
DATASET,
REPORT,
AB_TEST,
INPUT_VARIABLE_SET
search_query
string

Search entities by name (case-insensitive partial match).

flatten
boolean
default:false

When true, returns all entities recursively within the folder hierarchy instead of only direct children.

include_metadata
boolean
default:false

When true, includes type-specific metadata for each entity (e.g., prompt type, latest version number).

Response

Successful Response

entities
FolderEntity · object[]

List of entities matching the query.