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

# GetThreadMessagesAPI mirrors the erdo_get_thread_messages MCP tool as a REST
endpoint.




## OpenAPI

````yaml /api/openapi.json get /v1/threads/{threadID}/messages
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-07-25'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/threads/{threadID}/messages:
    get:
      summary: >
        GetThreadMessagesAPI mirrors the erdo_get_thread_messages MCP tool as a
        REST

        endpoint.
      operationId: GET:mcp.GetThreadMessagesAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: threadID
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  messages:
                    items:
                      $ref: '#/components/schemas/mcp.MCPMessageWithContents'
                    type: array
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.MCPMessageWithContents:
      properties:
        contents:
          items:
            $ref: '#/components/schemas/mcp.MCPMessageContent'
          type: array
        message:
          $ref: '#/components/schemas/mcp.MCPMessage'
      title: |
        MCPMessageWithContents groups a message with its contents.
      type: object
    mcp.MCPMessageContent:
      properties:
        content:
          type: object
        content_type:
          type: string
        created_at:
          type: string
        created_by_invocation_id:
          format: uuid
          type: string
        id:
          format: uuid
          type: string
        message_id:
          format: uuid
          type: string
        ui_content_type:
          type: string
      title: >
        MCPMessageContent is a clean representation of message content for
        MCP/REST

        consumers.
      type: object
    mcp.MCPMessage:
      properties:
        author_email:
          type: string
        author_entity_type:
          type: string
        author_id:
          format: uuid
          type: string
        author_name:
          type: string
        created_at:
          type: string
        id:
          format: uuid
          type: string
        thread_id:
          format: uuid
          type: string
      title: >
        MCPMessage is a clean representation of a message for MCP/REST
        consumers.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````