Folders
Organize knowledge entries into folders
Organize your knowledge entries into folders for better management.
Create Folder
Request
curl -X POST "https://platform.protobox.ai/api/v1/knowledge/folders" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Policies",
"description": "Company policies and procedures",
"color": "#3B82F6",
"icon": "file-text"
}'const response = await fetch('https://platform.protobox.ai/api/v1/knowledge/folders', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + accessToken,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Policies',
description: 'Company policies and procedures'
})
});
const { data } = await response.json();
console.log('Created folder:', data.id);Response
{
"success": true,
"data": {
"id": "folder_abc123",
"workspaceId": "674e1234567890abcdef0001",
"name": "Policies",
"description": "Company policies and procedures",
"color": "#3B82F6",
"icon": "file-text",
"documentCount": 0,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}Create Folder Parameters
namestringrequiredFolder name. Must be unique within workspace. Max 100 characters.
descriptionstringFolder description. Max 500 characters.
colorstringHex color code for UI display.
iconstringIcon name for UI display.
List Folders
curl -X GET "https://platform.protobox.ai/api/v1/knowledge/folders" \
-H "Authorization: Bearer <access_token>"{
"success": true,
"data": {
"folders": [
{
"id": "folder_abc123",
"name": "Policies",
"description": "Company policies and procedures",
"documentCount": 12,
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "folder_def456",
"name": "Products",
"description": "Product documentation",
"documentCount": 24,
"createdAt": "2024-01-14T08:00:00Z"
}
]
}
}Get Folder
curl -X GET "https://platform.protobox.ai/api/v1/knowledge/folders/folder_abc123" \
-H "Authorization: Bearer <access_token>"Update Folder
curl -X PATCH "https://platform.protobox.ai/api/v1/knowledge/folders/folder_abc123" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Policies",
"description": "Updated description"
}'Delete Folder
curl -X DELETE "https://platform.protobox.ai/api/v1/knowledge/folders/folder_abc123" \
-H "Authorization: Bearer <access_token>"Deleting a folder moves all its documents to the root level (no folder).
Move Entry to Folder
Move a knowledge entry to a different folder:
curl -X POST "https://platform.protobox.ai/api/v1/knowledge/695c71705a8b2ca8d9016050/move" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"folderId": "folder_abc123"
}'To move to root (no folder):
curl -X POST "https://platform.protobox.ai/api/v1/knowledge/695c71705a8b2ca8d9016050/move" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"folderId": null
}'{
"success": true,
"data": {
"id": "695c71705a8b2ca8d9016050",
"folderId": "folder_abc123",
"previousFolderId": null
}
}Move Parameters
folderIdstringTarget folder ID. Use null to move to root.