info:
  name: Approve Registration - KOReader
  type: http
  seq: 13

http:
  method: GET
  url: '{{base_url}}/api/devices/approve/reg-uuid-123'
  auth: inherit

docs: |-
  ## Approve KOReader Device Registration

  Approves a pending KOReader device registration.

  **Method:** GET

  **Endpoint:** /api/devices/approve/:registration_id

  **Authentication:** Required (Bearer token)

  **Path Parameters:**
  - `registration_id` (string): Example: `reg-uuid-123`

  **Response:**
  - `registration_id` (string): Approved registration UUID
  - `device_id` (string): Generated device UUID
  - `device_name` (string): KOReader device name
  - `device_type` (string): `koreader`
  - `status` (string): `approved`
  - `access_token` (string): Device access token
  - `sync_endpoints` (object):
    - `bookmarks` (string): Bookmarks sync endpoint
    - `progress` (string): Progress sync endpoint
    - `highlights` (string): Highlights sync endpoint
    - `annotations` (string): Annotations sync endpoint

  **Status Codes:**
  - 200: Approved successfully
  - 401: Unauthorized
  - 403: Forbidden
  - 404: Registration not found

  **KOReader-Specific Features:**
  - Supports per-book SHA-256 based progress tracking
  - Syncs highlights with color and notes
  - Syncs bookmarks with locations and timestamps
  - Supports dictionary annotations
  - Can sync custom highlight colors

  **After Approval:**
  - KOReader device can immediately sync
  - Device shows up in device list as "KOReader"
  - Access token is stored in device settings
  - Initial sync pulls down existing user data
