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

# Get Messages

> Retrieves messages for a specific conversation with pagination support



## OpenAPI

````yaml GET /conversations/get-messages
openapi: 3.1.0
info:
  title: Tatu API
  description: API documentation for Tatu's booking and artist management system
  version: 1.0.0
servers:
  - url: http://localhost:3000/api
    description: Development server
security: []
paths:
  /conversations/get-messages:
    get:
      summary: Get Messages
      description: Retrieves messages for a specific conversation with pagination support
      parameters:
        - name: conversationId
          in: query
          required: true
          schema:
            type: string
          description: The ID of the conversation
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
          description: Maximum number of messages to retrieve
        - name: lastMessageId
          in: query
          required: false
          schema:
            type: string
          description: Cursor for pagination - ID of the last message from previous request
      responses:
        '200':
          description: Messages retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMessagesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - User not in conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Conversation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GetMessagesResponse:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
        hasMore:
          type: boolean
          description: Whether there are more messages available
        nextCursor:
          type: string
          description: Cursor for fetching the next page of messages
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Message:
      type: object
      properties:
        id:
          type: string
          description: Message ID
        senderId:
          type: string
          description: ID of the user who sent the message
        content:
          type: string
          description: Message content
        timestamp:
          type: number
          description: Timestamp when the message was sent
        readBy:
          type: array
          items:
            type: string
          description: Array of user IDs who have read this message
        type:
          type: string
          description: Message type (text, system, etc.)

````