> ## 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 session events

> List persisted session stream events with cursor pagination.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/sessions/{sessionId}/events
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/sessions/{sessionId}/events:
    get:
      tags:
        - Sessions
      summary: List session events
      description: List persisted session stream events with cursor pagination.
      operationId: listSessionEvents
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: cursor
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
                exclusiveMinimum: 0
        - in: query
          name: limit
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
            default: 50
        - in: query
          name: messageId
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List session events
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        createdAt:
                          type: string
                          format: date-time
                        eventType:
                          type: string
                        id:
                          type: integer
                          exclusiveMinimum: 0
                        messageId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        provider:
                          type: string
                          enum:
                            - anthropic
                            - openai
                            - openai_responses
                            - openai_completions
                            - tembo
                        sessionId:
                          type: string
                          format: uuid
                        eventData:
                          type: object
                          properties:
                            type:
                              type: string
                              maxLength: 100
                            scope:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - foreground
                                    - subagent
                                    - background
                                parentToolUseId:
                                  type: string
                                  maxLength: 1000
                                taskId:
                                  type: string
                                  maxLength: 1000
                              required:
                                - kind
                            source:
                              type: string
                              maxLength: 500
                            providerEvent:
                              type: boolean
                            delivery:
                              type: string
                              enum:
                                - realtime
                                - persist
                            event:
                              type: object
                              properties:
                                event:
                                  type: string
                                  maxLength: 500
                                message:
                                  type: string
                                  maxLength: 1000000
                                provider:
                                  type: string
                                  maxLength: 100
                                messageId:
                                  type: string
                                  maxLength: 1000
                              required:
                                - event
                                - message
                            index:
                              type: integer
                            itemId:
                              type: string
                              maxLength: 1000
                            sequenceNumber:
                              type: integer
                            accumulatedText:
                              type: string
                              maxLength: 1000000
                            deltaType:
                              type: string
                              enum:
                                - text_delta
                                - input_json_delta
                            responsePhase:
                              type: string
                              enum:
                                - commentary
                                - final_answer
                            toolName:
                              type: string
                              maxLength: 1000
                          required:
                            - type
                      required:
                        - createdAt
                        - eventType
                        - id
                        - messageId
                        - provider
                        - sessionId
                        - eventData
                      additionalProperties: false
                  nextCursor:
                    type:
                      - string
                      - 'null'
                required:
                  - items
                  - nextCursor
                additionalProperties: false
        '400':
          description: Invalid request or missing resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: The session is private
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The caller is not permitted to perform this operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Session resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Session operation conflicts with existing data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Session operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '502':
          description: Session runtime or provider 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

````