meta { name: Create Ebook type: http seq: 3 } post { url: http://localhost:8765/api/ebooks body: json auth: inherit } body:json { { "title": "Sample Book", "author": "Sample Author", "isbn": "1234567890", "description": "A sample ebook", "file_path": "/uploads/sample.epub", "file_size": 1024000, "mime_type": "application/epub+zip", "cover_image_path": "/uploads/cover.jpg", "series": "Sample Series", "series_number": 1, "tags": "fiction,adventure", "asin": "B0123456789", "date_published": "2023-01-15", "publisher": "Sample Publisher", "contributors": "Editor Name, Illustrator Name" } } script:post-response { function onResponse(res) { let data = res.getBody(); let token = bru.setEnvVar("ebookid", data.id, { persist: true }); } onResponse(res); } settings { encodeUrl: true timeout: 0 } docs { ## Create Ebook Creates a new ebook entry in the library. **Authentication:** Required (Bearer token) **Request Body:** - `title` (string, required): Book title - `author` (string, optional): Book author - `isbn` (string, optional): ISBN number - `description` (string, optional): Book description - `file_path` (string, required): Path to ebook file - `file_size` (number, optional): File size in bytes - `mime_type` (string, optional): MIME type - `cover_image_path` (string, optional): Path to cover image - `series` (string, optional): Book series name - `series_number` (number, optional): Position in series - `tags` (string, optional): Comma-separated tags - `asin` (string, optional): Amazon ASIN - `date_published` (string, optional): Publication date (YYYY-MM-DD) - `publisher` (string, optional): Publisher name - `contributors` (string, optional): Additional contributors **Response:** Created ebook object **Error Responses:** - 401: Invalid authentication - 400: Invalid request data }