> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Messages

> Returns the full transcript of a MedAssist conversation, including tool calls, user feedback and session context.

Use this endpoint to read everything that happened in one conversation: user messages, agent replies, tool calls and their results, plus any feedback the user left.

Get the conversation ID from the `data-session-id` values returned by [Get Conversation](https://developer.eka.care/docs/agents/get-conversation.md).

## Headers

**Authorization** `string` *required*

Bearer token. Format: `Bearer <token>`

## Path parameters

**conversation\_id** `string` *required*

ID of the conversation (the `data-session-id` value from Get Conversation).

## Response

**messages** `object[]`

Messages in the order they were sent.

**properties**

**msg\_id** `string`

Unique ID of the message.

**role** `string`

Who produced the message: `user`, `assistant` or `tool`.

**content** `object[]`

Parts that make up the message. Each part has a `type`:

* `text`: plain text. Fields: `text`, `tid` (ID of the text part).
* `tool_call`: the agent called a tool (assistant messages only). Fields: `tool_id`, `tool_name`, `tool_input` (object with the tool's arguments).
* `tool_result`: the result returned for a tool call (tool messages only). Fields: `tool_id` (matches the `tool_call`), `result`, and optional `sources` (array of `{ "label", "url" }`).

For interactive tools such as `elicit_selection`, `result` holds the option the user picked or the text they typed.

**usage** `object | null`

Token usage for assistant messages; `null` for other roles.

**properties**

**input\_tokens** `integer`

Input tokens used.

**output\_tokens** `integer`

Output tokens generated.

**latency\_ms** `integer | null`

LLM response time in milliseconds, if recorded.

**feedback** `object`

Feedback the end user left for this conversation.

**properties**

**present** `boolean`

Whether any feedback was given.

**type** `string`

Feedback form type.

**nps\_base5** `integer | null`

Rating from 1 to 5, or `null` if not rated.

**options** `object[]`

Feedback options the user selected. Each has `label` and `value`.

**user\_context** `object | null`

Details of the signed-in user, if the session was authenticated. `null` otherwise.

**properties**

**name** `string`

User's name.

**age** `integer`

Age.

**gender** `string`

Gender.

**marital\_status** `string`

Marital status.

**dob** `string`

Date of birth.

**mobile** `string`

Mobile number.

**is\_authenticated** `boolean`

Whether the user was signed in.

**tz** `string | null`

Timezone of the session, as an IANA name (for example `Asia/Kolkata`).

**initial\_context** `object`

Context that was passed when the session was created. Empty object if none.

> [!NOTE]
>
> This response can contain patient health information and personal details. Store and display it according to your data-protection obligations.

```bash cURL theme={null}
curl --request GET \
  --url 'https://console.eka.care/conversations/<conversation-id>/messages/' \
  --header 'Authorization: Bearer <token>'
```

```json 200 theme={null}
{
  "messages": [
    {
      "msg_id": "1789461095244-0",
      "role": "user",
      "content": [
        { "type": "text", "text": "How can I get rid of kidney stones faster?", "tid": "0" }
      ],
      "usage": null
    },
    {
      "msg_id": "1789461095272-0",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "Drinking plenty of water usually helps. A urologist can advise on the best treatment for your case. Would you like me to find a specialist?",
          "tid": "1"
        },
        {
          "type": "tool_call",
          "tool_id": "toolu_01AbCdEfGhIjKlMnOpQrStUv",
          "tool_name": "elicit_selection",
          "tool_input": {
            "component": "pills",
            "text": "How would you like to continue?",
            "options": ["Find a urologist", "Book an appointment", "More information"]
          }
        }
      ],
      "usage": { "input_tokens": 2, "output_tokens": 445, "latency_ms": null }
    },
    {
      "msg_id": "1789461174145",
      "role": "tool",
      "content": [
        {
          "type": "tool_result",
          "tool_id": "toolu_01AbCdEfGhIjKlMnOpQrStUv",
          "result": "Find a urologist"
        }
      ],
      "usage": null
    }
  ],
  "feedback": {
    "present": false,
    "type": "default",
    "nps_base5": null,
    "options": []
  },
  "user_context": null,
  "tz": "Asia/Kolkata",
  "initial_context": {}
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.