1. Books
Flow Download Manager API
  • Public
    • Health check
      GET
    • List published books
      GET
    • Request a single book download
      POST
    • Request a bulk download (all books for a language)
      POST
    • Download a file via token
      GET
  • Books
    • List all books
      GET
    • Create a book
      POST
    • Get book details
      GET
    • Update a book
      PUT
    • Soft-delete a book
      DELETE
    • Bulk upsert books
      POST
    • Reorder books
      PATCH
  • Files
    • List files for a book
      GET
    • Add a file (local upload or cloud link)
      POST
    • Upload or replace a file
      PUT
    • Update file metadata
      PATCH
    • Delete a file
      DELETE
  • Translations
    • Add or update a translation
      POST
    • Delete a translation
      DELETE
  • Languages
    • List all languages
      GET
    • Create a language
      POST
    • Get language usage stats
      GET
    • Update a language
      PUT
    • Delete a language
      DELETE
  • Channels
    • List distribution channels
    • Create a channel
    • Update a channel
    • Delete a channel
    • Get publication matrix
    • Toggle a publication
  • Contacts
    • List contacts (paginated)
    • Get contact details with download history
    • Export contacts as CSV
  • Analytics
    • Dashboard summary
    • Downloads over time
    • Downloads by book
    • Downloads by country
    • Downloads by language
    • Downloads by device type
    • Download event log (paginated)
    • Export download events as CSV
  • Settings
    • Get app settings
    • Update GeoIP database
  • API Keys
    • List API keys
    • Create an API key
    • Revoke an API key
  • Schemas
    • Error
    • Pagination
    • PublicBook
    • AdminBook
    • BookDetail
    • BookFile
    • Translation
    • Language
    • Channel
    • ApiKey
    • Contact
    • DownloadEvent
  1. Books

Bulk upsert books

POST
/api/admin/books/bulk
Creates or updates multiple books in a single request.
Matches on slug for updates. Supports nested translations and cloud file links.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
API Key
Add parameter in cookie
next-auth.session-token
Example:
next-auth.session-token: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Bulk operation results
Body

🟠400
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/admin/books/bulk' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "books": [
        {
            "titleEn": "Steps to Christ",
            "translations": [
                {
                    "languageCode": "fr",
                    "title": "Vers Jésus"
                }
            ],
            "files": [
                {
                    "languageCode": "fr",
                    "fileType": "pdf",
                    "sourceType": "google_drive",
                    "cloudUrl": "https://drive.google.com/file/d/abc123/view",
                    "fileName": "vers-jesus.pdf",
                    "fileSizeBytes": 3145728
                }
            ]
        }
    ]
}'
Response Response Example
200 - Success
{
    "summary": {
        "total": 1,
        "created": 0,
        "updated": 1,
        "failed": 0
    },
    "results": [
        {
            "index": 0,
            "slug": "steps-to-christ",
            "status": "updated",
            "bookId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "translationsUpserted": 1,
            "filesUpserted": 1
        }
    ]
}
Modified at 2026-03-27 22:49:45
Previous
Soft-delete a book
Next
Reorder books
Built with