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

# Get thread messages

> Get the replies of a thread as a cursor-paged envelope `{ items, hasMore, nextBefore }`, paged like
`GET /messages` with `paginated=true`: the first page holds the newest `limit` replies (default 50, max 100),
each page is oldest-first, and `before=<nextBefore>` fetches the next older page until `hasMore` is `false`.
If the cursor message was deleted between two calls, the request fails with 409; restart from the newest
page. Only messages with a `thread` object have replies.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /messages/{messageId}/thread
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /messages/{messageId}/thread:
    get:
      tags:
        - Messages
      summary: Get thread messages
      description: >-
        Get the replies of a thread as a cursor-paged envelope `{ items,
        hasMore, nextBefore }`, paged like

        `GET /messages` with `paginated=true`: the first page holds the newest
        `limit` replies (default 50, max 100),

        each page is oldest-first, and `before=<nextBefore>` fetches the next
        older page until `hasMore` is `false`.

        If the cursor message was deleted between two calls, the request fails
        with 409; restart from the newest

        page. Only messages with a `thread` object have replies.
      operationId: GetThreadMessages
      parameters:
        - in: path
          name: messageId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
        - in: query
          name: before
          required: false
          schema:
            type: string
        - in: query
          name: limit
          required: false
          schema:
            type: number
            format: double
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.