1. Books
Dag Books API Docs
  • 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
    • Get public cover image with fallback
      GET
    • Get the favicon as a 256px link-preview icon
      GET
  • Books
    • List all books
      GET
    • Create a book
      POST
    • Get book details
      GET
    • Update a book
      PUT
    • Archive or permanently delete a book
      DELETE
    • Bulk upsert books
      POST
    • Reorder books
      PATCH
    • Restore an archived book
      POST
  • 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
    • Get book visibility for a sub-language
      GET
    • Update book visibility for a sub-language
      PUT
  • 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
  • Covers
    • List all covers across all active books
    • List covers for a specific book
    • Upload or replace a cover image
    • Delete a cover image
    • Get cover image binary (admin)
  • Schemas
    • Error
    • Pagination
    • PublicBook
    • AdminBook
    • BookDetail
    • BookFile
    • Translation
    • CoverMetadata
    • Language
    • Channel
    • ApiKey
    • SubLanguageBookOverride
    • Contact
    • DownloadEvent
  1. Books

Restore an archived book

POST
/api/admin/books/{bookId}/restore
Requires edit_books. Sets isActive = 1 and clears the archived
fields. If the book has no active files at all (archived under the
old behaviour that deactivated files), reactivates the newest
inactive file per (language, format).

Request

Path Params

Responses

🟢200OK
application/json
Book restored
Bodyapplication/json

🟠401Unauthorized
🟠404Record Not Found
🟠409
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/admin/books//restore'
Response Response Example
200 - Success Example
{
    "success": true,
    "book": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "slug": "the-great-controversy",
        "isActive": 1
    },
    "reactivatedFiles": 0
}
Modified at 2026-09-11 13:19:25
Previous
Reorder books
Next
List files for a book
Built with