--- method: GET path: /api/devices/:id/sidecar/download auth: jwt area: devices --- # Download Sidecar Config Generates and downloads a `.bookhoard.json` sidecar configuration file for a device (used by the sidecar sync workflow). The body is a JSON document returned with `Content-Disposition: attachment`. ## Example response ```json example-response { "version": "1.0", "bookhoard": { "opds_catalog": "http://localhost:8765/opds/devices/550e8400-.../catalog", "sync_api": "http://localhost:8765/api/sync/kobo", "opds_base_url": "http://localhost:8765/opds", "api_base_url": "http://localhost:8765/api", "device_id": "550e8400-e29b-41d4-a716-446655440000", "device_token": "dev_abc123..." }, "books": {}, "collections": [], "opds_enabled": true, "sidecar_enabled": true, "last_updated": "2026-10-24T13:57:01Z" } ``` ## Errors | Status | Body | When | | ------ | ---- | ---- | | 400 | `{"error": "invalid device ID"}` | malformed id | | 404 | `{"error": "device not found"}` | no such device | | 500 | `{"error": "failed to fetch media items"}` / `{"error": "failed to generate config"}` | unexpected server error |