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
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the directory |
| description | string | No | A description for the directory |
| parentId | string | No | The ID of the parent directory to create a subdirectory |
parentId is not provided, the directory will be created at the root
level.| Field | Description |
|---|---|
| id | Unique identifier assigned to the directory |
| status | Set to “active” by default |
| depth | Calculated based on parent hierarchy (0 for root) |
| createdAt | Timestamp when directory was created |
| updatedAt | Timestamp when directory was last modified |
| metadata | User, organization, and workspace information |
Root Level (depth: 0)
parentId are placed at the root level with
depth: 0.Subdirectories (depth: 1+)
parentId, the system automatically calculates the depth
by incrementing the parent’s depth by 1.Depth Limits
API key for authentication