Record a batch of reading sessions
POST/api/v1/reading-sessions
Sessions are the source of truth behind reading progress and reading time. A client measures them locally, queues them while offline, and replays the queue here.
Two properties make replay safe. Submitting an id that is already present
changes nothing and still reports as accepted, so a batch whose response was
lost can be sent again. And sessions are ordered by clientEndedAt rather
than by arrival, so a session read earlier but synced later does not
overwrite one that was read more recently.
Sessions are always recorded against the authenticated user; there is no way to write another user's reading.
Request
Responses
- 200
- 400
- 401
- 403
Batch processed; check rejected for entries that were not recorded
Batch exceeds the maximum size
Unauthorized
Forbidden