Export Book
POST /api/writing/outline/export
POST
/api/writing/outline/export
Export the full outline as a compiled book document.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” project_id
required
Project Id
string
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
DocumentExportResponse
Document export API response model.
Provides confirmation and file information for document export operations including export status, document identification, output format, file path, and export timestamp. Used for multi-format document export with metadata preservation.
Fields:
status: Export operation status (“success” or “error”)document_id: Unique identifier of exported documentformat: Export format identifier (“docx”, “pdf”, “txt”, “md”)export_path: Filesystem path to exported filetimestamp: ISO 8601 timestamp of export operation
Supported Formats:
"docx": Microsoft Word document format (default)"pdf": Portable Document Format"txt": Plain text format"md": Markdown format
Export Features:
- Format conversion with metadata preservation
- Structure and formatting retention
- Custom export options (future)
- Batch export support (future)
- Template-based export (future)
Usage: POST /api/creative/export/document returns this response model.
JSON Example (Success):
{
"status": "success",
"documentId": "doc_abc123",
"format": "docx",
"exportPath": "/exports/doc_abc123.docx",
"timestamp": "2025-01-31T10:30:00Z"
}
JSON Example (PDF Export):
{
"status": "success",
"documentId": "doc_abc123",
"format": "pdf",
"exportPath": "/exports/doc_abc123.pdf",
"timestamp": "2025-01-31T10:30:00Z"
}
Integration:
- ImportExportService: Performs document export with format conversion
- File System: Writes exported file to specified path
- Frontend UI: Provides download link and export confirmation
- Publishing Workflows: Enables document publishing and sharing
object
status
required
Status
Export status
string
documentId
required
Documentid
Document ID that was exported
string
format
required
Format
Export format
string
exportPath
required
Exportpath
Filesystem path to exported file
string
timestamp
required
Timestamp
Export timestamp (ISO format)
string
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