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

# Chat Message

> Retrieves a specific chat message by its ID.

**How to find chat_message_id:**
Look for the event with `event_name` set to `search_results` in the Chat API response data. For detailed instructions, see [search_results event response](https://docs.linqalpha.com/api-reference/basic/chat_v2#option-6).



## OpenAPI

````yaml GET /v1/chat_messages/{chat_message_id}
openapi: 3.0.1
info:
  title: LinqAlpha API
  description: >-
    Linq helps finance professionals make informed decisions using
    Retrieval-Augmented Generation (RAG)-enhanced answers. By leveraging
    cutting-edge Large Language Models (LLM) and supplementary technology, Linq
    provides the most optimized responses based on your queries.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.linqalpha.com
security:
  - ApiKeyAuth: []
tags:
  - name: Search
    description: Search and generate responses
  - name: Data
    description: Data retrieval and mapping
  - name: Feedback
    description: Conversation feedback
  - name: RMS
    description: Research Management System
  - name: Source Management
    description: Source batch and file management
  - name: MCP
    description: >-
      LinqAlpha MCP — Financial data tools for AI assistants via Model Context
      Protocol
  - name: Connectors
    description: Customer Connectors — customer-owned MCP connector management
  - name: Briefing
    description: Briefing Agent — automated market briefings with scheduling and delivery
  - name: Status
    description: Sync status — check organization, document, and container sync progress
paths:
  /v1/chat_messages/{chat_message_id}:
    get:
      tags:
        - Data
      summary: Chat Message
      description: >-
        Retrieves a specific chat message by its ID.


        **How to find chat_message_id:**

        Look for the event with `event_name` set to `search_results` in the Chat
        API response data. For detailed instructions, see [search_results event
        response](https://docs.linqalpha.com/api-reference/basic/chat_v2#option-6).
      parameters:
        - name: chat_message_id
          in: path
          description: Chat message ID
          required: true
          schema:
            type: string
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Chat message response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatMessageResponse'
              example:
                chat_message_id: 123e4567-e89b-12d3-a456-426614174000
                message: The company's revenue grew by 20% in the last quarter. ...
                message_type: assistant
                created_at: '2025-10-30T09:11:31.667544Z'
        '400':
          description: Bad Request - Missing or invalid chat_message_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error:
                  code: CHAT_MESSAGE_ID_MISSING
                  msg: chat_message_id is required
                  message: chat_message_id is required
                payload: null
        '401':
          description: Unauthorized - Invalid API key or authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error:
                  code: API_KEY_MISSING
                  msg: header does not contain api key
                  message: header does not contain api key
                payload: null
components:
  schemas:
    ChatMessageResponse:
      type: object
      properties:
        chat_message_id:
          type: string
          format: uuid
          description: Chat message ID
        message:
          type: string
          description: Chat message
        message_type:
          type: string
          description: Chat message type
          enum:
            - assistant
            - user
            - think
          example: assistant
        created_at:
          type: string
          description: Chat message created at
          example: '2025-10-30T09:11:31.667544Z'
    ApiErrorResponse:
      type: object
      description: Standard error response wrapper
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        payload:
          description: Always null for error responses
          nullable: true
      required:
        - error
        - payload
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error code indicating the type of error. Common codes:

            - Authentication: `API_KEY_MISSING`, `INVALID_API_KEY`

            - Validation: `INVALID_REQUEST_BODY`, `ORGANIZATION_ID_MISSING`,
            `TICKERS_MISSING`, `CHAT_MESSAGE_ID_MISSING`, `DOCUMENT_ID_MISSING`

            - Service: `SEARCH_FAIL`, `TTS_FAIL`, `CREATE_CONV_FAIL`,
            `GET_STOCK_FAIL`, `CREATE_MSG_FAIL`, `ALPHA_COMP_FAIL`,
            `GET_REF_FAIL`

            - Connectors: `CONNECTOR_LIST_FAIL`, `CONNECTOR_NOT_FOUND`,
            `CONNECTOR_CREATE_FAIL`, `CONNECTOR_UPDATE_FAIL`,
            `CONNECTOR_DELETE_FAIL`, `CONNECTOR_TEST_FAIL`

            - Not Found: `NOT_FOUND`
          example: INVALID_REQUEST_BODY
        msg:
          type: string
          description: Error message (deprecated, use `message` instead)
          example: query is required and must be a string
        message:
          type: string
          description: Error message providing more details about the error
          example: query is required and must be a string
      required:
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````