Get Conversation Messages

Retrieves all messages associated with a specific conversation session ID. This endpoint is used to display the detailed message view in the Global Conversations analytics page.

Method: GET

Path: /api/v1/conversations/{sessionId}/messages

Path Parameters

ParameterTypeDescription
sessionIdstringThe unique identifier of the conversation session.

Response Body

The response is a JSON array of message objects.

filename="AnalyticsChatMessage[]"
[
  {
    "id": "string (Message ID)",
    "role": "string ('user' | 'assistant' | 'human_agent')",
    "content": "string",
    "timestamp": "string (ISO 8601 datetime)",
    "metadata": {
      "sources": {
        "1": {
          "text": "string",
          "url": "string | null",
          "score": "number",
          "title": "string | undefined"
        }
        // ... other sources
      },
      "confidence": "number | undefined"
      // ... other potential metadata
    }
  }
  // ... more messages
]

AnalyticsChatMessage Object Properties

PropertyTypeDescription
idstringUnique identifier for the message.
roleuser | assistant | human_agentThe role of the message sender.
contentstringThe textual content of the message.
timestampstringISO 8601 timestamp of when the message was created.
metadataobjectOptional. Contains additional information about the message, such as sources used or confidence scores.
metadata.sourcesobjectOptional. Key-value pairs where keys are source numbers and values are source information objects.
metadata.sources[key].textstringThe text snippet from the source.
metadata.sources[key].urlstring | nullThe URL of the source, if available.
metadata.sources[key].scorenumberA score indicating the relevance or confidence in the source.
metadata.sources[key].titlestring | undefinedThe title of the source document/page, if available.
metadata.confidencenumber | undefinedOptional. A confidence score for the assistant’s message.

The structure of the metadata object, particularly sources, is based on the existing message display logic and might evolve.

Example Request

curl -X GET \
  /api/v1/conversations/session_xyz123abc/messages \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>'