Skip to main content
POST
/
api
/
public
/
v2
/
folders
/
entities
Move Folder Entities
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/folders/entities \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "entities": [
    {
      "id": 123,
      "type": "FOLDER"
    }
  ],
  "folder_id": 123,
  "workspace_id": 123
}
'
{
  "moved_count": 123
}
Moves one or more entities into a target folder, or to the workspace root if no folder_id is provided. Supports moving folders, prompts, snippets, workflows, datasets, evaluations, AB tests, and input variable sets. Requires appropriate edit permissions for each entity type.

Headers

X-API-KEY
string
required

Body

application/json
entities
EntityReference · object[]
required

List of entities to move.

folder_id
integer | null

The ID of the destination folder. If null or not provided, entities are moved to the workspace root.

workspace_id
integer

The ID of the workspace.

Response

Entities moved successfully

moved_count
integer

The number of entities affected by the operation.