---
title: "List messages in a chat"
method: GET
path: "/api/public/organizations/{orgId}/chats/{chatId}/messages"
tags: ["Chats"]
---

# List messages in a chat

`GET /api/public/organizations/{orgId}/chats/{chatId}/messages`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/chats/{chatId}/messages`
- Auth: HTTP bearer

Lists the messages in a chat, newest first. Each message includes its plain-text content plus structured parts (reasoning, tool activity, and referenced charts).

## Path parameters

- `orgId` string, required: Organization ID
- `chatId` string, required: Chat ID

## Query parameters

- `limit` integer: Maximum number of items to return (1-100, default 50)
- `cursor` string: Cursor for pagination (ID of the last item from previous page)

## Response `200`

Messages retrieved successfully

- PublicChatMessageListResponse
  - `data` PublicChatMessage[], required
    - `id` string, required: Chat message ID
    - `chatId` string, required: Chat ID
    - `role` 'user' | 'assistant', required: Message author role
    - `status` 'generating' | 'finished' | 'aborted' | 'error' | 'action_required', required: `generating` while the assistant is responding, `finished` when the response is complete, `aborted` if it was canceled, `error` if it failed, and `action_required` if the assistant is waiting on a confirmation it cannot receive over the API
    - `parentId` string, nullable, required: User message ID associated with an assistant response
    - `text` string, required: The message as plain text. For assistant messages this is the final answer, without reasoning or tool activity; see parts for the full structured content.
    - `parts` PublicChatContentPart[], required: Ordered structured message content
      - `id` string, required: Content part ID
      - `type` 'text' | 'reasoning_summary' | 'tool_call' | 'tool_call_result' | 'context' | 'action' | 'image' | 'file', required: Content part type
      - `content` string, required: Text content or a JSON-encoded payload for structured part types
      - `externalId` string, nullable, required: Provider item or tool call ID, when present
      - `name` string, nullable, required: Tool or content part name
      - `phase` 'commentary' | 'final_answer' | 'null', nullable, required: Assistant response phase
      - `createdAt` string, date-time, required: Creation timestamp
      - `updatedAt` string, date-time, required: Last update timestamp
    - `charts` PublicChatChart[], required: Charts referenced by the assistant response
      - `chartId` string, required: Chart ID
      - `chartVersionId` string, required: Chart version ID
      - `title` string, required: Chart title
      - `imageUrl` string, uri, required: URL that renders this chart as a PNG. Request it with the same API key authentication.
      - `mimeType` string, required: Screenshot MIME type
      - `width` integer, required: Screenshot width
      - `height` integer, required: Screenshot height
    - `createdAt` string, date-time, required: Creation timestamp
    - `updatedAt` string, date-time, required: Last update timestamp
  - `pagination` PaginationMeta, required
    - `nextCursor` string, nullable, required: Cursor for the next page (null if no more pages)
    - `hasMore` boolean, required: Whether there are more items after this page

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Chat not found or no member access
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
