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

# List message history

> Returns a cursor-paginated message history for the room, newest first.



## OpenAPI

````yaml /openapi/shared.yaml get /api/v1/chat/rooms/{room_id}/messages
openapi: 3.0.3
info:
  title: Shared Service API
  version: 1.0.0
  description: |2-

        **Shared Service API** - Comprehensive shared service and management system.

        ## Versionings
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
  contact:
    name: API Support
    email: thakacreations@gmail.com
  license:
    name: thakacreations
servers: []
security: []
paths:
  /api/v1/chat/rooms/{room_id}/messages:
    get:
      tags:
        - chat
      summary: List message history
      description: Returns a cursor-paginated message history for the room, newest first.
      operationId: chat_rooms_messages_list
      parameters:
        - in: path
          name: room_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageListResponse'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    MessageListResponse:
      type: object
      properties:
        next:
          type: string
          nullable: true
        previous:
          type: string
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/Message'
      required:
        - next
        - previous
        - results
    Message:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        room:
          type: string
          format: uuid
          readOnly: true
        sender:
          type: string
          readOnly: true
        content:
          type: string
          readOnly: true
        url:
          type: string
          readOnly: true
        reply_to_id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        is_edited:
          type: boolean
          readOnly: true
        edited_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        read_by:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - content
        - created_at
        - edited_at
        - id
        - is_edited
        - read_by
        - reply_to_id
        - room
        - sender
        - updated_at
        - url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````