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

# List Session Messages

> Return messages for a session with cursor-based pagination (chronological order).



## OpenAPI

````yaml cloud/openapi/v3.json get /sessions/{session_id}/messages
openapi: 3.1.0
info:
  title: Browser Use Public API v3
  summary: Browser Use session-based agent API (v3)
  version: 3.0.0
servers:
  - url: https://api.browser-use.com/api/v3
    description: Production server
security: []
paths:
  /sessions/{session_id}/messages:
    get:
      tags:
        - Sessions
      summary: List Session Messages
      description: >-
        Return messages for a session with cursor-based pagination
        (chronological order).
      operationId: list_session_messages_sessions__session_id__messages_get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: 'Cursor: return messages after this message ID'
            title: After
          description: 'Cursor: return messages after this message ID'
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: 'Cursor: return messages before this message ID'
            title: Before
          description: 'Cursor: return messages before this message ID'
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    MessageListResponse:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/MessageResponse'
          type: array
          title: Messages
        hasMore:
          type: boolean
          title: Hasmore
      type: object
      required:
        - messages
        - hasMore
      title: MessageListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MessageResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        sessionId:
          type: string
          format: uuid
          title: Sessionid
        role:
          type: string
          title: Role
        data:
          type: string
          title: Data
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
        - id
        - sessionId
        - role
        - data
        - createdAt
      title: MessageResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````