Skip to content

docs(sessions): migrate GET/POST /api/sessions/{sessionId}/chats#204

Merged
sweetmantech merged 1 commit into
mainfrom
docs/session-chats-endpoints
May 12, 2026
Merged

docs(sessions): migrate GET/POST /api/sessions/{sessionId}/chats#204
sweetmantech merged 1 commit into
mainfrom
docs/session-chats-endpoints

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented May 12, 2026

Summary

Documents the two new session-scoped chat endpoints landing in api#552:

  • GET /api/sessions/{sessionId}/chats{ chats: ChatSummary[], defaultModelId }
  • POST /api/sessions/{sessionId}/chats{ chat }, with optional { id } for optimistic client flows (idempotent same-session, 409 cross-session, 400 on empty id)

Test plan

  • npx mintlify@latest dev — pages render under Sessions
  • Try-it panel renders schemas for both endpoints

🤖 Generated with Claude Code


Summary by cubic

Adds docs and OpenAPI for session chat endpoints GET/POST /api/sessions/{sessionId}/chats, with Try It panels. Covers list response defaultModelId and POST idempotency with optional id.

  • New Features
    • OpenAPI: adds GET/POST paths with ChatSummary, ListSessionChatsResponse, CreateSessionChatRequest/Response, and error schemas (400/401/403/404/409/500).
    • Docs: new pages “List Session Chats” and “Create Session Chat”; added under Sessions.

Written for commit 07b445e. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added two new session management endpoints: list all chats within a session and create new chats with optional client-supplied identifiers
    • Chat responses now include status information about read state and streaming status
  • Documentation

    • Added API reference documentation for new session chat endpoints
    • Updated API documentation navigation to include new chat management pages

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR adds OpenAPI documentation and reference pages for two new session-chat endpoints: a GET endpoint to list chats within a session and a POST endpoint to create a new chat with optional idempotent client-supplied identifiers. The OpenAPI schemas define request/response shapes and error conditions, while new MDX documentation pages provide API reference content integrated into the Sessions navigation.

Changes

Session Chat API Documentation

Layer / File(s) Summary
OpenAPI Endpoint and Schema Definitions
api-reference/openapi/sessions.json
Defines /api/sessions/{sessionId}/chats GET (list session chats with summaries and flags) and POST (create chat with optional deterministic id) endpoints, including request/response schemas, HTTP status codes (401, 403, 404, 400, 409, 500), and supporting component schemas (ChatSummary, ListSessionChatsResponse, CreateSessionChatRequest, CreateSessionChatResponse, InvalidChatIdError, ChatIdConflictError).
API Reference Documentation and Navigation
api-reference/sessions/list-chats.mdx, api-reference/sessions/create-chat.mdx, docs.json
Adds MDX reference pages for both chat endpoints with frontmatter linking to the OpenAPI definitions, and expands the Sessions navigation group to include both new pages alongside the existing session get page.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • recoupable/docs#186: Adds related session-level POST endpoint and Chat schema to OpenAPI sessions documentation.

Suggested reviewers

  • sweetmantech

Poem

🐰 A rabbit hops through session chat,
New endpoints documented, imagine that!
GET and POST with schemas neat,
Navigation links—the docs are complete! 📚✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: documenting two new session-scoped chat endpoints (GET and POST) for the sessions API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/session-chats-endpoints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Adds OpenAPI paths + schemas (ChatSummary, ListSessionChatsResponse,
CreateSessionChatRequest/Response, parity errors) and two MDX pages,
plus nav entries under the Sessions group.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sweetmantech sweetmantech force-pushed the docs/session-chats-endpoints branch from 3321ffb to 07b445e Compare May 12, 2026 01:56
@sweetmantech sweetmantech merged commit 42f0b9c into main May 12, 2026
1 of 2 checks passed
@sweetmantech sweetmantech deleted the docs/session-chats-endpoints branch May 12, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants