info:
  name: KOReader Sync Annotations - Per-Book SHA-256
  type: http
  seq: 4
http:
  method: POST
  url: '{{base_url}}/api/v1/koreader/sync/bookmarks'
  auth: inherit
  body:
    type: json
    jsonBody: "{\n    \"book_uuid\": \"{{book_uuid"
  headers:
  - key: Authorization
    value: Bearer {{koreader_device_token

docs: |-
  ## KOReader Sync Annotations - Per-Book SHA-256
  
    Synchronizes annotations (highlights) from KOReader with per-annotation SHA-256 hashes for multi-book sync.
  
    **Method:** POST
  
    **Endpoint:** /api/v1/koreader/sync/bookmarks
  
    **Authentication:** Bearer token (KOReader device token)
  
    **Request Body:**
    - `book_uuid` (string): Primary book UUID
    - `highlights` (array): Array of highlight objects
      - `text` (string): Highlighted text
      - `pos0`, `pos1` (string): EPUB CFI positions
      - `color` (string): Highlight color (hex)
      - `page` (number): Page number
      - `book_sha256` (string): SHA-256 hash for this specific book
  
    **Response:**
    - `highlights_synced` (number): Number of highlights synced
  
    **Status Codes:**
    - 200: Success
    - 401: Unauthorized
    - 500: Internal server error
  
    **Note:** Each highlight can include its own book_sha256, allowing annotations from multiple books in a single request.
