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

# Move Folder Entities

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.


## OpenAPI

````yaml POST /api/public/v2/folders/entities
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/folders/entities:
    post:
      tags:
        - folders
      summary: Move Folder Entities
      operationId: move_folder_entities_api_public_v2_folders_entities_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveFolderEntitiesRequest'
      responses:
        '200':
          description: Entities moved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderEntitiesCountResponse'
        '400':
          description: Bad request - Missing workspace_id or invalid entity type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Folder or entity not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderNotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    MoveFolderEntitiesRequest:
      type: object
      required:
        - entities
      properties:
        entities:
          type: array
          items:
            $ref: '#/components/schemas/EntityReference'
          description: List of entities to move.
        folder_id:
          type: integer
          nullable: true
          description: >-
            The ID of the destination folder. If null or not provided, entities
            are moved to the workspace root.
        workspace_id:
          type: integer
          description: The ID of the workspace.
      title: MoveFolderEntitiesRequest
    FolderEntitiesCountResponse:
      type: object
      properties:
        moved_count:
          type: integer
          description: The number of entities affected by the operation.
      title: FolderEntitiesCountResponse
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      title: UnauthorizedError
    FolderNotFoundError:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      title: FolderNotFoundError
    EntityReference:
      type: object
      required:
        - id
        - type
      properties:
        id:
          type: integer
          exclusiveMinimum: 0
          description: The ID of the entity.
        type:
          $ref: '#/components/schemas/EntityType'
      title: EntityReference
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EntityType:
      type: string
      enum:
        - FOLDER
        - PROMPT
        - SNIPPET
        - WORKFLOW
        - DATASET
        - REPORT
        - AB_TEST
        - INPUT_VARIABLE_SET
      description: >-
        The type of entity. SNIPPET is a pseudo-entity type representing
        completion-type prompts.
    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
  responses:
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````