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

# List thread messages

> List the conversation on a thread, merged across all channels and sorted oldest-first by default. Requires the threads:read scope.



## OpenAPI

````yaml openapi-v2.json get /threads/{thread_id}/messages
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /threads/{thread_id}/messages:
    get:
      tags:
        - threads
      summary: List thread messages
      description: >-
        List the conversation on a thread, merged across all channels and sorted
        oldest-first by default. Requires the threads:read scope.
      operationId: threads-listMessages
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
          description: >-
            Sort by `created_at`. `asc` returns oldest first (default, matches
            the conversation timeline); `desc` returns newest first.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - email
              - slack
              - chat
              - live_chat
              - feedback
          description: >-
            Filter to a single channel. `email` for email replies, `slack` for
            Slack and Slack Connect, `chat` for Microsoft Teams (and any future
            chat platforms), `live_chat` for in-app live chat sessions,
            `feedback` for the synthesized initial message that the thread was
            opened with.
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - inbound
              - outbound
          description: >-
            Filter by message direction. `inbound` is from the contact,
            `outbound` is from your workspace. For live chat, `inbound` maps to
            `USER` messages and `outbound` to `AGENT`.
        - name: user_id
          in: query
          required: false
          schema:
            type: string
          description: >-
            Workspace user id. Filters to outbound messages sent by this user.
            Live chat messages have no user attribution and are excluded when
            this is set.
        - name: q
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            Case-insensitive substring search across the message body. Searches
            email subject and text, slack/chat/live-chat text.
        - name: created_after
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: created_before
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: updated_after
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: updated_before
          in: query
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - email
                            created_at:
                              type: string
                            direction:
                              type: string
                              enum:
                                - inbound
                                - outbound
                            subject:
                              type: string
                            from: {}
                            to:
                              type: array
                            cc:
                              type: array
                            bcc:
                              type: array
                            text:
                              type: string
                            html:
                              type: string
                            attachments:
                              type: array
                            thread_id:
                              type: string
                            user_id:
                              type: string
                              nullable: true
                          required:
                            - id
                            - type
                            - created_at
                            - direction
                            - subject
                            - to
                            - cc
                            - bcc
                            - text
                            - html
                            - attachments
                            - thread_id
                            - user_id
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - slack
                            created_at:
                              type: string
                            direction:
                              type: string
                              enum:
                                - inbound
                                - outbound
                            channel_id:
                              type: string
                            team_id:
                              type: string
                            slack_id:
                              type: string
                            slack_user_id:
                              type: string
                            slack_thread_id:
                              type: string
                              nullable: true
                            slack_link:
                              type: string
                            text:
                              type: string
                            html:
                              type: string
                            attachments:
                              type: array
                            thread_id:
                              type: string
                            user_id:
                              type: string
                              nullable: true
                          required:
                            - id
                            - type
                            - created_at
                            - direction
                            - channel_id
                            - team_id
                            - slack_id
                            - slack_user_id
                            - slack_thread_id
                            - slack_link
                            - text
                            - html
                            - attachments
                            - thread_id
                            - user_id
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - chat
                            created_at:
                              type: string
                            direction:
                              type: string
                              enum:
                                - inbound
                                - outbound
                            platform:
                              type: string
                            platform_message_id:
                              type: string
                            chat_thread_id:
                              type: string
                            author_id:
                              type: string
                              nullable: true
                            author_name:
                              type: string
                              nullable: true
                            text:
                              type: string
                            html:
                              type: string
                            attachments:
                              type: array
                            thread_id:
                              type: string
                            user_id:
                              type: string
                              nullable: true
                          required:
                            - id
                            - type
                            - created_at
                            - direction
                            - platform
                            - platform_message_id
                            - chat_thread_id
                            - author_id
                            - author_name
                            - text
                            - html
                            - attachments
                            - thread_id
                            - user_id
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - live_chat
                            created_at:
                              type: string
                            role:
                              type: string
                            content:
                              type: string
                            attachments:
                              type: array
                            from_email:
                              type: string
                              nullable: true
                            from_name:
                              type: string
                              nullable: true
                            from_image_url:
                              type: string
                              nullable: true
                            session_id:
                              type: string
                          required:
                            - id
                            - type
                            - created_at
                            - role
                            - content
                            - attachments
                            - from_email
                            - from_name
                            - from_image_url
                            - session_id
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - feedback
                            created_at:
                              type: string
                            direction:
                              type: string
                              enum:
                                - inbound
                                - outbound
                            title:
                              type: string
                              nullable: true
                            text:
                              type: string
                            html:
                              type: string
                            origin:
                              type: string
                            thread_id:
                              type: string
                          required:
                            - id
                            - type
                            - created_at
                            - direction
                            - title
                            - text
                            - html
                            - origin
                            - thread_id
                          additionalProperties: false
                  page:
                    type: object
                    properties:
                      cursor:
                        type: string
                        nullable: true
                      has_more:
                        type: boolean
                      limit:
                        type: integer
                    required:
                      - cursor
                      - has_more
                      - limit
                    additionalProperties: false
                required:
                  - data
                  - page
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````