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

# List communication messages

> List chronological messages for a communication thread.



## OpenAPI

````yaml GET /communication/threads/{id}/messages
openapi: 3.0.1
info:
  title: Masivo's REST API
  description: Learn how to use Masivo's REST API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.masivo.ai/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /communication/threads/{id}/messages:
    get:
      description: List chronological messages for a communication thread.
      parameters:
        - in: header
          name: x-account-id
          description: The account that owns the communication thread
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          description: The communication thread id
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: from
          schema:
            type: integer
            default: 0
        - in: query
          name: to
          schema:
            type: integer
            default: 99
      responses:
        '200':
          description: Communication messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CommunicationMessage'
                  from:
                    type: number
                  to:
                    type: number
                  count:
                    type: number
        '404':
          description: Communication thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CommunicationMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        thread_id:
          type: string
          format: uuid
        parent_message_id:
          type: string
          format: uuid
          nullable: true
        external_message_id:
          type: string
          nullable: true
        direction:
          $ref: '#/components/schemas/CommunicationDirection'
        message_type:
          $ref: '#/components/schemas/CommunicationMessageType'
        channel:
          $ref: '#/components/schemas/CommunicationChannel'
        sender_type:
          $ref: '#/components/schemas/CommunicationSenderType'
        sender_user_id:
          type: string
          format: uuid
          nullable: true
        sender_customer_id:
          type: string
          nullable: true
        sender_email:
          type: string
          format: email
          nullable: true
        sender_display_name:
          type: string
          nullable: true
        recipient_actor_ids:
          type: array
          items:
            type: object
            additionalProperties: true
        subject:
          type: string
          nullable: true
        body_text:
          type: string
          nullable: true
        body_html:
          type: string
          nullable: true
        attachments:
          type: array
          items:
            type: object
            additionalProperties: true
        raw_payload:
          type: object
          additionalProperties: true
        sent_at:
          type: string
          format: date-time
          nullable: true
        delivered_at:
          type: string
          format: date-time
          nullable: true
        read_at:
          type: string
          format: date-time
          nullable: true
        failed_at:
          type: string
          format: date-time
          nullable: true
        status:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
    Error:
      required:
        - error
        - details
      type: object
      properties:
        error:
          type: string
        details:
          type: string
    CommunicationDirection:
      type: string
      enum:
        - inbound
        - outbound
        - internal
        - system
    CommunicationMessageType:
      type: string
      enum:
        - message
        - reply
        - internal_note
        - system_event
        - review_event
    CommunicationChannel:
      type: string
      enum:
        - email
        - whatsapp
        - chat
        - review
        - system
        - other
    CommunicationSenderType:
      type: string
      enum:
        - customer
        - agent
        - system
        - integration
        - email
        - unknown
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````