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

# Update document folder

> Renames a knowledge base folder, moves it under another folder, or moves it to the top level. A moved folder takes its documents and subfolders with it, and a folder cannot be moved into itself or one of its own subfolders. The response carries only a confirmation message, so refetch the folders to read the new values.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json patch /v1/stable/document-folder/{folderID}
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/document-folder/{folderID}:
    patch:
      tags:
        - Document Folder
      summary: Update document folder
      description: Renames a knowledge base folder, moves it under another folder, or
        moves it to the top level. A moved folder takes its documents and
        subfolders with it, and a folder cannot be moved into itself or one of
        its own subfolders. The response carries only a confirmation message, so
        refetch the folders to read the new values.
      operationId: StableDocumentFolderController_update
      parameters:
        - name: folderID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the knowledge base folder to operate on.
          description: The ID of the knowledge base folder to operate on.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/StableDocumentFolderUpdateRequest"
      responses:
        "200":
          description: Confirms the folder was updated. The body is a message rather than
            the revised folder, so refetch the folder list to see its new name
            or parent.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableUpdateResponse"
          x-vf-doc:
            description: Confirms the folder was updated. The body is a message rather than
              the revised folder, so refetch the folder list to see its new name
              or parent.
      security:
        - token: []
components:
  schemas:
    StableDocumentFolderUpdateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the folder.
        parentID:
          description: The ID of the folder to move this folder into, or null to move it
            to the top level. Omit it to keep the folder where it is.
          nullable: true
          type: string
          minLength: 1
      additionalProperties: false
    StableUpdateResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message confirming the update.
      required:
        - message
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
