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

# Get Chat Messages

> Retrieve all messages (memories) for a specific chat room in chronological order.



## OpenAPI

````yaml api-reference/openapi/research.json GET /api/chats/{id}/messages
openapi: 3.1.0
info:
  title: Recoup API - Research
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/chats/{id}/messages:
    get:
      description: >-
        Retrieve all messages (memories) for a specific chat room in
        chronological order.
      parameters:
        - name: id
          in: path
          description: The unique identifier (UUID) of the chat room.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Messages retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatMessagesResponse'
        '400':
          description: Bad request - invalid chat id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatMessagesErrorResponse'
        '401':
          description: Unauthorized - invalid or missing credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - caller does not have access to this chat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found - chat does not exist or is not accessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatMessagesErrorResponse'
        '500':
          description: Server error - failed to retrieve messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatMessagesErrorResponse'
components:
  schemas:
    GetChatMessagesResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
          description: Chronologically ordered list of messages for the chat
    GetChatMessagesErrorResponse:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Error message describing what went wrong
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    ChatMessage:
      type: object
      required:
        - id
        - room_id
        - content
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the memory message
        room_id:
          type: string
          format: uuid
          description: UUID of the parent chat room
        content:
          type: object
          description: Structured message payload stored for the memory
        updated_at:
          type: string
          format: date-time
          description: ISO timestamp of the memory update

````