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

# List messages

> Read the conversation's messages, oldest first, cursor-paginated
(max 100 per page). Pass `after` = the last message id you have.
Reading messages does NOT mark the conversation read — use the explicit
read receipt.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /s2s/conversations/{conversationId}/messages
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/conversations/{conversationId}/messages:
    get:
      tags:
        - S2S Conversations
      summary: List messages
      description: |-
        Read the conversation's messages, oldest first, cursor-paginated
        (max 100 per page). Pass `after` = the last message id you have.
        Reading messages does NOT mark the conversation read — use the explicit
        read receipt.
      operationId: ListMessages
      parameters:
        - in: path
          name: conversationId
          required: true
          schema:
            type: string
        - in: query
          name: after
          required: false
          schema:
            type: string
        - in: query
          name: limit
          required: false
          schema:
            type: number
            format: double
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  next_after:
                    type: string
                    nullable: true
                  has_more:
                    type: boolean
                  items:
                    items:
                      $ref: '#/components/schemas/S2SMessage'
                    type: array
                required:
                  - next_after
                  - has_more
                  - items
                type: object
      security:
        - s2s: []
components:
  schemas:
    S2SMessage:
      properties:
        id:
          type: string
        conversationId:
          type: string
        text:
          type: string
        author:
          $ref: '#/components/schemas/S2SAuthor'
        attachments:
          items:
            $ref: '#/components/schemas/S2SAttachment'
          type: array
        replyToMessageId:
          type: string
        rating:
          type: string
        unread:
          type: boolean
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - conversationId
        - author
        - attachments
        - unread
        - createdAt
      type: object
      additionalProperties: false
    S2SAuthor:
      properties:
        type:
          type: string
          enum:
            - contact
            - agent
            - bot
            - system
        id:
          type: string
        name:
          type: string
        avatar:
          type: string
      required:
        - type
      type: object
      additionalProperties: false
    S2SAttachment:
      properties:
        url:
          type: string
        name:
          type: string
        contentType:
          type: string
      required:
        - url
      type: object
      additionalProperties: false
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````