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

# Update component folders

> Updates a set of component folders. Each folder is identified by its developer ID. Only provided fields are modified — omitted fields remain unchanged. Set parentId to move a folder (provide null to move it to the library root); set newDeveloperId to rename a folder's developer ID.



## OpenAPI

````yaml openapi.json patch /componentFolders
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /componentFolders:
    patch:
      tags:
        - Component Folders
      summary: Update component folders
      description: >-
        Updates a set of component folders. Each folder is identified by its
        developer ID. Only provided fields are modified — omitted fields remain
        unchanged. Set parentId to move a folder (provide null to move it to the
        library root); set newDeveloperId to rename a folder's developer ID.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      developerId:
                        type: string
                        description: The folder's current developer ID
                      name:
                        type: string
                        description: >-
                          New name for the folder. If not provided, name remains
                          unchanged.
                      parentId:
                        type: string
                        nullable: true
                        description: >-
                          Developer ID of the folder to move this folder into.
                          Provide null or "root" to move it to the library root.
                          Omit to leave the folder's parent unchanged.
                      newDeveloperId:
                        type: string
                        description: >-
                          A new developer ID for this folder. Must be unique
                          within the workspace. Can be set alongside a name or
                          parent change in the same update object.
                    required:
                      - developerId
                  minItems: 1
                  description: Array of updates to folders
              required:
                - updates
              example:
                updates:
                  - developerId: text-fields
                    name: Inputs — Text Fields
            examples:
              rename_folder:
                summary: Rename a folder
                value:
                  updates:
                    - developerId: text-fields
                      name: Inputs — Text Fields
              move_folder:
                summary: Move a folder to a new parent
                value:
                  updates:
                    - developerId: text-fields
                      parentId: inputs
              move_to_root:
                summary: Move a folder to the library root
                value:
                  updates:
                    - developerId: text-fields
                      parentId: null
              update_developer_id:
                summary: Change a folder's developer ID
                value:
                  updates:
                    - developerId: text-fields
                      newDeveloperId: input-fields
      responses:
        '200':
          description: Returns success status of the update operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the update was successful
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: a developer ID that does not match any existing folder in
            the workspace, a parentId that does not match any existing folder,
            or a parent move that would create a circular folder hierarchy.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: Folder id not found
        '409':
          description: >-
            Returned when a supplied newDeveloperId already exists in the
            workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the conflict
                required:
                  - message
              example:
                message: already exists in workspace
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````