Get Folder
GET /api/writing/folders/{folder_id}
π Get a specific folder.
Retrieves a folder by its unique identifier.
Args: folder_id: Unique folder identifier service: Injected DocumentCategoriesService instance
Returns: WritingFolderResponse: Folder details
Raises: HTTPException 404: If folder not found HTTPException 500: If folder retrieval fails
Parameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters βFolder ID
Folder ID
Responses
Section titled β Responses βSuccessful Response
Response model for a single document folder in Writing Studio.
Provides complete folder information including metadata, display properties, and document count statistics. Used by document categories/folder endpoints for folder CRUD operations and listing.
Fields:
id: Unique folder identifier (UUID string)name: Folder display name (1-100 characters)parent_id: Parent folder ID (null for root-level folders)color: Folder color in hex format (default: #6366f1 indigo)icon: Folder icon name from icon library (default: folder)description: Folder description for organization (optional)created_at: ISO 8601 timestamp of folder creationupdated_at: ISO 8601 timestamp of last modificationorder: Sort order position within parent folderdocument_count: Number of documents in this folder
Usage:
- GET /api/creative/categories/folders/{folder_id} returns this model
- POST /api/creative/categories/folders returns this model
- PUT /api/creative/categories/folders/{folder_id} returns this model
- Used in folder lists and tree structures
JSON Example:
{
"id": "folder_abc123",
"name": "Drafts",
"parentId": null,
"color": "#f59e0b",
"icon": "file-edit",
"description": "Work in progress documents",
"createdAt": "2025-12-04T10:00:00Z",
"updatedAt": "2025-12-04T10:00:00Z",
"order": 0,
"documentCount": 15
}
Integration:
- DocumentCategoriesService: Provides folder data
- Frontend FolderTree: Displays folder hierarchy
- Drag-and-drop UI: Uses order for positioning
object
Unique folder identifier
Folder display name
Folder color (hex)
Folder icon name
Folder description
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Sort order position
Documents in folder
Validation Error