Overview
Create a new knowledge base folder to organize your documents. Folders help structure your AI assistant’s knowledge, making it easier to manage, update, and maintain your content. Folders can be nested to create hierarchical organizations that match your business structure.Use Cases
- Organize by Topic: Create folders for different product lines, services, or topics
- Department Structure: Organize knowledge by department (Sales, Support, HR)
- Content Type: Separate FAQs, policies, guides, and procedures
- Nested Organization: Create parent folders with subfolders for detailed organization
- Team Collaboration: Structure shared knowledge bases for team access
- Version Control: Maintain different versions in separate folders
Authentication
This endpoint requires authentication using an API key. Include your API key in the request header:Request Body
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Folder name (must be unique per client) |
icon | string | No | Emoji/icon for the folder |
sort_order | number | No | Display order (default: 0) |
parent_folder_id | string (UUID) | No | Parent folder ID for nested folders |
Unique Names: Folder names must be unique within your organization.
Response Structure
Returns the created folder object:Field | Type | Description |
---|---|---|
id | string (UUID) | Unique folder identifier |
name | string | Folder name |
icon | string | null | Folder icon/emoji |
sort_order | number | Display order |
client_id | string (UUID) | Your organization ID |
parent_folder_id | string | null | Parent folder ID (null for root folders) |
created_at | string (ISO) | Creation timestamp |
updated_at | string (ISO) | Last update timestamp |
Example Requests
Create Root Folder
Create Nested Folder
Example Response
Common Use Cases
1. Create Folder Structure
2. Create Folder with Sort Order
3. Create and Use Folder Immediately
Sort Order
Thesort_order
field determines display order:
- Lower numbers appear first
- Default is 0 if not specified
- Can be negative for priority items
- Used for consistent UI ordering
Nested Folders
Create folder hierarchies by settingparent_folder_id
:
Documentation > User Guides > Getting Started
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid data or duplicate name |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Something went wrong |
Important Notes
- Unique Names: Folder names must be unique within your organization
- UUID Parent:
parent_folder_id
must be a valid UUID of an existing folder - Icon Format: Icons are typically emoji characters (optional)
- Sort Order: Use integers for consistent ordering
- Auto-generated ID: Folder ID is automatically generated (UUID)
Folder Icons
Common folder icon examples:Icon | Use Case |
---|---|
📚 | General documentation |
📁 | Generic folder |
🏢 | Company/business folders |
🛍️ | Product folders |
💡 | Ideas/knowledge |
🔧 | Technical documentation |
👥 | Team/HR folders |
📋 | Policies/procedures |
🎓 | Training materials |
🌐 | Public/external content |
Related Endpoints
- GET /api/documents/assistant/folders - List all folders
- POST /api/documents/assistant/raw - Upload document to folder
- DELETE /api/documents/assistant/ - Delete a document
Workflow Example
Complete workflow for organizing knowledge base:Headers
API key needed to authorize the request
Body
application/json
Folder details