---
title: "Move Query Folder"
method: PATCH
path: "/data/projects/{projectId}/queries/folders/{folderId}/path"
tags: ["Data -- Query Folders"]
---

# Move Query Folder

`PATCH /data/projects/{projectId}/queries/folders/{folderId}/path`

## Request

- Base URL: `https://partner.peaka.studio/api/v1`
- URL: `https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}/path`
- Auth: HTTP bearer

Moves a query folder into another folder. `path` is the folder to move into ("/" for the project root); the moved folder keeps its name, so moving "/Reports" to "/Archive" gives "/Archive/Reports". All child folders and their paths are updated accordingly. Moving a folder into the folder it is already in changes nothing.

## Path parameters

- `projectId` string, required
- `folderId` string, required

## Request body

- QueryFolderMoveRequest: Request body for moving a query folder
  - `path` string, required: Path of the folder to move this folder into, or "/" for the project root. The moved folder keeps its name: moving "/Reports" to "/Archive" gives "/Archive/Reports". Folders missing along the path are created.

## Response `200`

Folder moved successfully

- QueryFolderItem: Represents a query folder
  - `id` string: Unique identifier of the folder (UUID)
  - `name` string: Display name of the folder
  - `path` string: Full path of the folder in the hierarchy
  - `parentId` string: ID of the parent folder, null if root-level
  - `createdAt` string: Timestamp when the folder was created (ISO 8601)

## Other responses

- `400`: The folder cannot be moved into itself or one of its sub-folders
- `404`: Folder not found
- `409`: A folder with this name already exists in the target folder

---

[API](https://skmtc.dev/peaka/apis/peaka-gateway-api.md) · [All operations](https://skmtc.dev/peaka/apis/peaka-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peaka/apis/peaka-gateway-api/revisions/e68b033a22d5?raw)
