Files
bookhoard/docs/developer/api/notes/update_note.md
T
John O'Keefe 7a7b2ab82a docs(highlights,notes,opds,progress,analytics): Beam batch 9 — 13 endpoints
Highlights + notes CRUD (media-item scoped, jwt), progress delete,
reading-stats analytics, and the OPDS trio frontmatter'd. OPDS docs are
the first XML entries: example-response intentionally omitted (Atom
responses), gate contract honored via nil-Response registry pins.

Gate fix: group .Use() middleware now parsed (opds.Use(DeviceAuth...
Authenticate) previously resolved to auth 'none'). Registry: 13 entries.
Drift fixed by gate: reading-stats key names (total_reading_time_minutes,
most_active_day_of_week, daily_reading_minutes — draft invented
reading_time_hours/books_completed); notes/highlights list endpoints
return BARE arrays (no {notes:[]}/{highlights:[]} wrapper); create-note
request has no percentage_location/epubcfi_location. New
/tmp/merge_arrays.py handles array-example merges.

make test 9/9.
2026-10-24 17:47:07 -04:00

1.7 KiB

method, path, auth, area
method path auth area
PUT /api/media-items/:id/notes/:noteId jwt media-items

Update Note

Update an existing note.

Endpoint: PUT /api/media-items/:id/notes/:noteId Auth: Required Content-Type: application/json

Path Parameters

Parameter Type Required Description
note_id string Yes Note UUID

Request Body

Field Type Required Description
content string No Updated note content
position string No Updated location reference

Example Request

{
  "content": "Updated note content",
  "position": "epubcfi(/6/4/2:20)"
}

Response (200 OK)

{
  "id": "uuid",
  "media_item_id": "uuid",
  "user_id": "uuid",
  "content": "Updated note content",
  "position": "epubcfi(/6/4/2:20)",
  "updated_at": "2026-01-31T10:00:00Z",
  "chapter_reference": null,
  "character_end": null,
  "character_start": null,
  "created_at": null,
  "dedup_key": null,
  "deleted": null,
  "deleted_at": null,
  "device_sync_data": null,
  "epubcfi_location": null,
  "last_modified_at": null,
  "last_modified_source": null,
  "paragraph_reference": null,
  "percentage_location": null
}

Error Responses

Code Description
400 Invalid note data
401 Invalid or expired token
403 User does not own this note
404 Note not found