Create a new directory (folder)
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
Use Cases
File Organization
Nested Structure
Workflow Automation
Team Collaboration
Request Parameters
Request Body
The request body must contain a JSON object with the following properties:parentId is not provided, the directory will be created at the root
level.Directory Properties
Automatic Fields
The following fields are automatically set by the system:Depth Calculation
Root Level (depth: 0)
Root Level (depth: 0)
parentId are placed at the root level with
depth: 0.Subdirectories (depth: 1+)
Subdirectories (depth: 1+)
parentId, the system automatically calculates the depth
by incrementing the parent’s depth by 1.Depth Limits
Depth Limits
Idempotency-Key request header so a retry
cannot apply the change twice. See
Idempotent requests.Authorizations
API key for authentication
Headers
Optional opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true.