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

# List messages

> List organization messages with optional session and thread filters.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/messages
openapi: 3.1.0
info:
  title: Tembo Public API
  description: Public API Endpoints for Tembo
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/messages:
    get:
      tags:
        - Messages
      summary: List messages
      description: List organization messages with optional session and thread filters.
      operationId: listMessages
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          schema:
            type: string
            pattern: ^\d+$
            default: '50'
        - in: query
          name: sessionId
          schema:
            type: string
            format: uuid
        - in: query
          name: threadId
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        artifactId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        content:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        createdBy:
                          type:
                            - string
                            - 'null'
                        externalAvatarUrl:
                          type:
                            - string
                            - 'null'
                        externalUrl:
                          type:
                            - string
                            - 'null'
                        id:
                          type: string
                          format: uuid
                        parentMessageId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        pullRequestId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        role:
                          type: string
                          enum:
                            - user
                            - assistant
                            - system
                        sessionId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        type:
                          type: string
                        updatedAt:
                          type: string
                          format: date-time
                        jsonContent:
                          allOf:
                            - 5906b0ed-29b0-4dca-b623-539756d1931f
                          description: >-
                            Raw JSON value stored for the message, including
                            legacy strings and unknown TipTap nodes or
                            attributes.
                          example:
                            type: doc
                            content:
                              - type: paragraph
                        slashCommand:
                          type:
                            - object
                            - 'null'
                          properties:
                            command:
                              type: string
                              minLength: 1
                              maxLength: 200
                            arguments:
                              type: string
                              maxLength: 100000
                          required:
                            - command
                          additionalProperties: false
                        source:
                          type:
                            - string
                            - 'null'
                          maxLength: 100
                      required:
                        - artifactId
                        - content
                        - createdAt
                        - createdBy
                        - externalAvatarUrl
                        - externalUrl
                        - id
                        - parentMessageId
                        - pullRequestId
                        - role
                        - sessionId
                        - type
                        - updatedAt
                        - jsonContent
                        - slashCommand
                        - source
                      additionalProperties: false
                  nextCursor:
                    type:
                      - string
                      - 'null'
                    format: uuid
                required:
                  - items
                  - nextCursor
                additionalProperties: false
        '400':
          description: Validation error or missing resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Message or session not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Message operation conflicts with its current state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Message operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````