docs(sessions): add endpoint to mark chat as read

Closed
AH
5mo ago
+97-1
  • Introduced a new POST endpoint /api/sessions/{sessionId}/chats/{chatId}/read to mark a session chat as read. This endpoint updates the lastReadAt timestamp for the specified chat and ensures idempotency.
  • Updated the OpenAPI specification with detailed request parameters and response schemas, including success and error responses.
  • Enhanced the documentation to include the new endpoint in the API reference, improving clarity for users managing session chats.

Summary by cubic

Documented a new POST endpoint to mark a session chat as read and updated the OpenAPI spec and API reference. This lets clients clear unread state (hasUnread becomes false) for a chat until new assistant activity arrives.

  • New Features
    • Added POST /api/sessions/{sessionId}/chats/{chatId}/read to upsert a read receipt and set lastReadAt. Idempotent.
    • OpenAPI: path params sessionId and chatId. 200 returns MarkChatReadResponse { success: true }. Added 401, 403, 404, 500 errors.
    • Docs: new API page and nav entry under Sessions.

Summary by CodeRabbit

  • New Features

    • Added a new POST /api/sessions/{sessionId}/chats/{chatId}/read endpoint with idempotent behavior and comprehensive error handling.
  • Documentation

    • Added documentation page for the new endpoint.
    • Updated API reference navigation to include the new resource.

Review Change Stack