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

# List Messages

> Retrieve all messages in a specific conversation thread

## Overview

Retrieve all messages in a specific conversation thread. Messages are returned in chronological order.


## OpenAPI

````yaml GET /chats/threads/{thread_id}/messages
openapi: 3.1.0
info:
  title: Ledgerbeam API
  description: >-
    Conversational analytics API for querying data using natural language,
    managing resources, and interacting with data sources
  version: 1.0.0
  contact:
    name: Ledgerbeam Support
    email: support@ledgerbeam.com
  license:
    name: MIT
servers:
  - url: https://api.ledgerbeam.com/v1
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /chats/threads/{thread_id}/messages:
    get:
      summary: List messages
      description: Retrieve all messages in a specific conversation thread
      operationId: listMessages
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
          description: Thread ID
      responses:
        '200':
          description: Messages retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Message'
        '404':
          description: Thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
          description: Message ID
          example: msg_abc123
        content:
          type: array
          items:
            $ref: '#/components/schemas/MessageContent'
          description: Message content
        role:
          type: string
          enum:
            - user
            - assistant
          description: Message role
          example: user
        meta:
          type: object
          description: Additional metadata
          additionalProperties: true
    Error:
      type: object
      properties:
        error:
          oneOf:
            - type: string
            - type: object
              properties:
                description:
                  type: array
                  items:
                    type: string
          description: Error message or validation errors
          example: Unauthorized access
    MessageContent:
      type: object
      properties:
        type:
          type: integer
          description: Content type (1 = text, 2 = table, etc.)
          example: 1
        value:
          type: string
          description: Content value
          example: Here are your top customers...
        meta:
          type: object
          description: Additional metadata
          additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: API-KEY
      description: API key for authentication

````