Get Document Folder
GET /api/writing/documents/{document_id}/folder
GET
/api/writing/documents/{document_id}/folder
📁 Get document’s folder.
Gets the folder a document belongs to.
Args: document_id: Document ID service: Injected DocumentCategoriesService instance
Returns: WritingDocumentFolderResponse: Folder ID or null if uncategorized
Raises: HTTPException 500: If folder lookup fails
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” document_id
required
Document Id
Document ID
string
Document ID
Responses
Section titled “ Responses ”Successful Response
WritingDocumentFolderResponse
Response model for getting a document’s folder in Writing Studio.
Provides the folder association for a specific document.
Fields:
document_id: Document ID queriedfolder_id: Folder ID the document belongs to (null if uncategorized)
Usage: GET /api/creative/categories/documents/{document_id}/folder returns this model.
JSON Example:
{
"documentId": "doc_abc123",
"folderId": "folder_xyz"
}Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context