> ## 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 recorded 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: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  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 recorded session stream events with cursor pagination.
      operationId: listSessionEvents
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
        - in: query
          name: cursor
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
          description: >-
            Continuation cursor from the previous response nextCursor. Omit for
            the first page; null nextCursor means there are no more pages.
        - in: query
          name: limit
          schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 100
          description: >-
            Maximum number of items to return in one page. Use nextCursor from
            the response to fetch more items.
        - in: query
          name: messageId
          schema:
            anyOf:
              - type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              - type: string
                const: 'null'
          description: Filter by message ID, or "null" for session-level events.
        - in: query
          name: after
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
                minimum: 0
                maximum: 9007199254740991
          description: Only return events recorded after this event ID.
      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
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                        eventType:
                          type: string
                        id:
                          type: integer
                          exclusiveMinimum: 0
                          maximum: 9007199254740991
                        messageId:
                          anyOf:
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            - type: 'null'
                        provider:
                          type: string
                          enum:
                            - anthropic
                            - openai
                            - openai_responses
                            - openai_completions
                            - tembo
                        sessionId:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        eventData:
                          $ref: '#/components/schemas/SessionEventData'
                      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 required organization or user
            information.
          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: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: >
            import Tembo from '@tembo-io/sdk';


            const client = new Tembo();


            const session = await
            client.sessions.listEvents('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
              limit: 50,
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .sessions()
                .list_events("7c9e6679-7425-40de-944b-e07fc1f90ae7")
                .send()
                .await?;
components:
  schemas:
    SessionEventData:
      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
          additionalProperties: false
        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
          additionalProperties: false
        index:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        itemId:
          type: string
          maxLength: 1000
        sequenceNumber:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        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
        toolResult:
          type: object
          properties:
            status:
              type: string
              enum:
                - running
                - completed
                - error
            output:
              type: string
            exitCode:
              type: number
            error:
              type: string
          required:
            - status
          additionalProperties: false
        snapshotId:
          type: string
        snapshotCreatedAt:
          type: string
      required:
        - type
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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