---
title: "Add/update a highlight/note/clipping (upsert by clientId)"
method: PUT
path: "/v1/sync/annotations"
tags: ["sync/data"]
---

# Add/update a highlight/note/clipping (upsert by clientId)

`PUT /v1/sync/annotations`

## 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/annotations`
- Auth: HTTP bearer

## Request body

- UpsertAnnotationDto
  - `clientId` string, required: client annotation id
  - `bookId` string, required
  - `kind` 'highlight' | 'note' | 'clipping', required
  - `chapterIndex` number
  - `paragraphIndex` number
  - `cfi` string
  - `selectedText` string
  - `color` string
  - `noteContent` string
  - `chapterTitle` string
  - `createdAtMs` number
  - `deleted` boolean

## 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)
