Skip to content

Get Document 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

document_id
required
Document Id

Document ID

string

Document ID

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 queried
  • folder_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"
}
object
documentId
required
Documentid

Document ID

string
folderId
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object