> ## 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.

# Create document folder

> Adds a folder to the knowledge base, at the top level or nested under another folder. Folders only organize documents; retrieval searches every document regardless of its folder.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/document-folder
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:
    post:
      tags:
        - Document Folder
      summary: Create document folder
      description: Adds a folder to the knowledge base, at the top level or nested
        under another folder. Folders only organize documents; retrieval
        searches every document regardless of its folder.
      operationId: StableDocumentFolderController_create
      parameters:
        - 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:
              $ref: "#/components/schemas/StableDocumentFolderCreateRequest"
      responses:
        "201":
          description: Returns the new folder with its generated ID, name, parent folder
            ID, and timestamps.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableDocumentFolderResponse"
          x-vf-doc:
            description: Returns the new folder with its generated ID, name, parent folder
              ID, and timestamps.
      security:
        - token: []
components:
  schemas:
    StableDocumentFolderCreateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the folder.
        parentID:
          default: null
          description: The ID of the folder to nest this folder in. Omit or pass null for
            a top-level folder.
          nullable: true
          type: string
          minLength: 1
      required:
        - name
      additionalProperties: false
    StableDocumentFolderResponse:
      type: object
      properties:
        folder:
          $ref: "#/components/schemas/StableDocumentFolder"
      required:
        - folder
    StableDocumentFolder:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the folder.
        parentID:
          nullable: true
          description: The ID of the folder this folder is nested in, or null for a
            top-level folder.
          type: string
          minLength: 1
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - parentID
        - createdAt
        - updatedAt
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
