# Create a new directory (folder)
Source: https://docs.file.ai/api-reference/folders/create-a-new-directory-folder

> Create a new directory (folder) to organize your files within the workspace.

post /prod/v1/directories

Create a new directory (folder) to organize your files within the workspace.

Directories can be nested by providing a parentId to create subdirectories. The system enforces a maximum directory depth limit (configurable via system settings, default is 1 level).

Request Body Parameters:

- name (required): The name of the directory

- description (optional): A description for the directory

- parentId (optional): The ID of the parent directory to create a subdirectory. If not provided, the directory will be created at the root level

Response:

The response includes the created directory object with:
- Basic information: id, name, description, status

- Hierarchy information: parentId, depth

- Metadata: userId, organizationId, workspaceId, createdBy, lastModifiedBy, etc.

- Timestamps: createdAt, updatedAt

Notes:

- The directory is created with status: "active" by default

- The authenticated user becomes the owner of the directory

- Directory depth is automatically calculated based on parent hierarchy
