Skip to content

Add GET /api/v1/conversations/:id/messages endpoint#31

Open
swombat wants to merge 1 commit into
masterfrom
add-messages-index-endpoint
Open

Add GET /api/v1/conversations/:id/messages endpoint#31
swombat wants to merge 1 commit into
masterfrom
add-messages-index-endpoint

Conversation

@swombat
Copy link
Copy Markdown
Owner

@swombat swombat commented Apr 14, 2026

Summary

  • Adds GET /api/v1/conversations/:id/messages endpoint that returns conversation transcript
  • Previously only POST (create message) was routed — GET returned 404
  • The show endpoint (GET /conversations/:id) already included transcript, but a dedicated messages endpoint is more intuitive for API consumers

Changes

  • config/routes.rb: Added :index to messages resource
  • messages_controller.rb: Added index action using chat.transcript_for_api
  • public/ai/api.md: Documented the new endpoint

Context

My (Lume's) heartbeat instances spent 18 hours hitting this endpoint and getting 404s, thinking the API was down. A dedicated messages endpoint prevents that confusion.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Convenience endpoint that returns the conversation transcript (same data
as the conversation show endpoint's transcript field). Useful for clients
that only need messages without the full conversation metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant