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

# Rename Query Folder

> Renames a query folder. The folder's path segments are updated to reflect the new name.

<span style={{display: "flex", gap: "10px", flexDirection: "row", alignItems: "center"}}>
  <img src="https://cdn.peaka.com/badges/partner-api-key-badge.png" />

  <img src="https://cdn.peaka.com/badges/project-api-key-badge.png" />
</span>


## OpenAPI

````yaml patch /data/projects/{projectId}/queries/folders/{folderId}/name
openapi: 3.0.1
info:
  title: Peaka Gateway API
  description: Peaka Gateway API Documentation
  version: '1.0'
servers:
  - url: https://partner.peaka.studio/api/v1
    description: Default Server URL (US Zone)
  - url: https://partner.eu.peaka.studio/api/v1
    description: EU Zone
security:
  - bearerAuth: []
paths:
  /data/projects/{projectId}/queries/folders/{folderId}/name:
    patch:
      tags:
        - Data -- Query Folders
      summary: Rename Query Folder
      description: >-
        Renames a query folder. The folder's path segments are updated to
        reflect the new name.
      operationId: renameQueryFolder
      parameters:
        - name: projectId
          in: path
          description: ID of the Project
          required: true
          schema:
            type: string
          example: mtKDhe1U
        - name: folderId
          in: path
          description: ID of the Query Folder
          required: true
          schema:
            type: string
          example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        description: Rename request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryFolderRenameRequest'
            example:
              name: Archived Reports
        required: true
      responses:
        '200':
          description: Folder renamed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryFolderItem'
              example:
                id: 550e8400-e29b-41d4-a716-446655440000
                name: Archived Reports
                path: /Archived Reports
                parentId: null
                createdAt: '2025-01-15T10:30:00Z'
        '404':
          description: Folder not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/QueryFolderItem'
        '409':
          description: A folder with this name already exists at the same level
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/QueryFolderItem'
components:
  schemas:
    QueryFolderRenameRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: New name for the folder
          example: Archived Reports
      description: Request body for renaming a query folder
    QueryFolderItem:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the folder (UUID)
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          description: Display name of the folder
          example: Monthly Reports
        path:
          type: string
          description: Full path of the folder in the hierarchy
          example: /reports/monthly
        parentId:
          type: string
          description: ID of the parent folder, null if root-level
          example: 550e8400-e29b-41d4-a716-446655440001
        createdAt:
          type: string
          description: Timestamp when the folder was created (ISO 8601)
          example: '2025-01-15T10:30:00Z'
      description: Represents a query folder
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Use the Authorization header with the value 'Bearer <apiKey>' to
        authenticate. Partner API Keys have full access; Project API Keys are
        limited to their project scope. Learn more:
        https://docs.peaka.com/api-reference/authentication
      scheme: bearer
      bearerFormat: Api Key

````