---
title: "Add/update a book in your library"
method: PUT
path: "/v1/sync/books/{bookId}"
tags: ["sync/library"]
---

# Add/update a book in your library

`PUT /v1/sync/books/{bookId}`

## Request

- Base URL: `https://api.ditto.audio` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ditto.audio/v1/sync/books/{bookId}`
- Auth: HTTP bearer

## Path parameters

- `bookId` string, required

## Request body

- UpdateBookDto
  - `bookId` string: client book id (stable across devices)
  - `title` string
  - `author` string
  - `format` string
  - `chapterCount` number
  - `contentHash` string: sha-256 of the book file
  - `coverImageUrl` string
  - `addedAtMs` number: client add time, ms epoch
  - `deleted` boolean: tombstone — remove from cloud library

## Response `200`

---

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