Skip to main content
GET
/
api
/
v1
/
user
/
conversations
/
{conversationId}
/
messages
List messages in a conversation
curl --request GET \
  --url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/user/conversations/{conversationId}/messages \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "conversationId": "<string>",
    "messages": [
      {
        "id": "<string>",
        "conversationId": "<string>",
        "role": "user",
        "content": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "tokenCount": 123,
        "model": "<string>",
        "toolCalls": [
          {}
        ],
        "rating": 123,
        "feedback": "<string>"
      }
    ],
    "pagination": {
      "hasMore": true,
      "before": "<string>"
    }
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "requestId": "<string>"
  }
}
Returns the chronological message stream for a conversation with optional role filtering and cursor-based pagination (before). The payload mirrors what the client renders inside the chat window, including token counts, model names, and tool call metadata when available.

Authentication

Supports both authentication methods:
  • Auth0 JWT: Authorization: Bearer <token> (registered users)
  • Device-based: x-device-id, x-user-id, x-platform headers (guest users)
In the playground above, select your preferred authentication method from the security dropdown.

Authorizations

Authorization
string
header
required

Auth0 access token for registered users.

Path Parameters

conversationId
string
required

Conversation ID (24 character MongoDB ObjectId).

Required string length: 24

Query Parameters

limit
integer
default:50
Required range: 1 <= x <= 100
before
string

Message ID to use as a cursor for backwards pagination.

role
enum<string>

Filter messages by speaker role.

Available options:
user,
assistant

Response

Message page returned.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required