---
title: "Disconnect Hardcover"
method: DELETE
path: "/api/hardcover"
tags: ["books"]
---

# Disconnect Hardcover

`DELETE /api/hardcover`

## Request

- Base URL: `https://leafle.org` (the document declares no server; this is the origin it was published from)
- URL: `https://leafle.org/api/hardcover`
- Auth: HTTP bearer

**Access: write token.**

Remove the connection and sync mappings. Imported books stay in the reading ledger. Remote token revocation is best-effort if Hardcover cannot be reached. `reader_id` is a query parameter.

## Query parameters

- `reader_id` integer, nullable

## Response `200`

Successful Response

- HardcoverConnection: GET/PATCH/DELETE /api/hardcover — the reader's Hardcover connection. Never carries a token. Connecting is not here at all: it is a browser redirect through Hardcover's approval screen (`/api/hardcover/authorize`), not something a JSON body can express.
  - `connected` boolean, required
  - `username` string
  - `push_enabled` boolean
  - `needs_reconnect` boolean
  - `connected_at` string, nullable
  - `last_sync_at` string, nullable
  - `last_sync_error` string, nullable
  - `books_synced` integer
  - `sync_frequency` string
  - `next_sync_at` string, nullable
  - `account_url` string, required
  - `available` boolean

## Other responses

- `401`: Missing or unusable credential.
- `403`: Insufficient token scope or the reader is outside your account.
- `422`: Validation Error

---

[API](https://skmtc.dev/leafle/apis/leafle-api.md) · [All operations](https://skmtc.dev/leafle/apis/leafle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leafle/apis/leafle-api/revisions/f2e56cb74495?raw)
