> ## 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 sessions

> List visible sessions with deterministic bounded cursor pagination.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/sessions
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:
    get:
      tags:
        - Sessions
      summary: List sessions
      description: List visible sessions with deterministic bounded cursor pagination.
      operationId: listSessions
      parameters:
        - in: query
          name: agentId
          schema:
            type: string
            format: uuid
        - in: query
          name: createdBy
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: createdAfter
          schema:
            type: string
            format: date-time
        - in: query
          name: cursor
          schema:
            type: string
            maxLength: 500
        - in: query
          name: excludePinned
          schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
              - type: boolean
        - in: query
          name: externalIds
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: hasProject
          schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
              - type: boolean
        - in: query
          name: includeArchived
          schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
              - type: boolean
            default: true
        - in: query
          name: includeTotal
          schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
              - type: boolean
            default: false
        - in: query
          name: limit
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
            default: 20
        - in: query
          name: participant
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: pendingReviewerKeys
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: projectIds
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: pullRequestStatuses
          schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
            default: []
        - in: query
          name: repositoryIds
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: search
          schema:
            type: string
            minLength: 1
            maxLength: 1000
        - in: query
          name: sortBy
          schema:
            type: string
            enum:
              - lastQueuedAt
              - createdAt
              - updatedAt
            default: lastQueuedAt
        - in: query
          name: sourceIds
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: sourceTypes
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: array
                items:
                  type: string
                  minLength: 1
            default: []
        - in: query
          name: state
          schema:
            type: string
            enum:
              - all
              - active
              - archived
            default: all
      responses:
        '200':
          description: List sessions
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        agent:
                          type:
                            - string
                            - 'null'
                        agentId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        createdAt:
                          type: string
                          format: date-time
                        externalId:
                          type:
                            - string
                            - 'null'
                        id:
                          type: string
                          format: uuid
                        kind:
                          type: string
                        lastQueuedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                        lastSeenAt:
                          type: string
                          format: date-time
                        level:
                          type: integer
                        projectId:
                          type:
                            - string
                            - 'null'
                        title:
                          type: string
                        updatedAt:
                          type: string
                          format: date-time
                        visibility:
                          type: string
                          enum:
                            - public
                            - private
                          default: public
                        artifacts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              pullRequest:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    agent:
                                      type:
                                        - string
                                        - 'null'
                                    codeRepository:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                          format: uuid
                                        provider:
                                          type: string
                                      required:
                                        - id
                                        - provider
                                      additionalProperties: false
                                    id:
                                      type: string
                                      format: uuid
                                    isDraft:
                                      type: boolean
                                    status:
                                      type: string
                                      enum:
                                        - open
                                        - merged
                                        - closed
                                    url:
                                      type: string
                                      format: uri
                                  required:
                                    - agent
                                    - codeRepository
                                    - id
                                    - isDraft
                                    - status
                                    - url
                                  additionalProperties: false
                              type:
                                type: string
                                enum:
                                  - PullRequest
                                  - ToolCall
                                  - Plan
                                  - Response
                                  - File
                                  - Service
                                  - Source
                            required:
                              - id
                              - pullRequest
                              - type
                            additionalProperties: false
                        diffSummary:
                          type:
                            - object
                            - 'null'
                          properties:
                            additions:
                              type: integer
                            deletions:
                              type: integer
                          required:
                            - additions
                            - deletions
                          additionalProperties: false
                        isPinned:
                          type: boolean
                        project:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            icon:
                              type: string
                              enum:
                                - folder
                                - code
                                - terminal
                                - book
                                - brain
                                - bug
                                - building
                                - cloud
                                - globe
                                - idea
                                - tools
                                - magic
                                - processor
                                - sandbox
                                - server
                                - tasks
                                - tactics
                                - images
                                - database
                                - api
                                - mobile
                                - package
                            color:
                              type: string
                              enum:
                                - neutral
                                - red
                                - orange
                                - yellow
                                - green
                                - teal
                                - blue
                                - purple
                                - pink
                          required:
                            - id
                            - name
                            - icon
                            - color
                          additionalProperties: false
                        sessionSource:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            type:
                              type: string
                            repositories:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                required:
                                  - id
                                additionalProperties: false
                          required:
                            - id
                            - name
                            - type
                            - repositories
                          additionalProperties: false
                        sourcePullRequest:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: string
                              format: uuid
                            url:
                              type: string
                              format: uri
                            title:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - open
                                - merged
                                - closed
                            isDraft:
                              type: boolean
                          required:
                            - id
                            - url
                            - title
                            - status
                            - isDraft
                          additionalProperties: false
                        state:
                          type: object
                          properties:
                            current:
                              type: string
                              enum:
                                - inProgress
                                - queued
                                - completed
                                - failed
                                - cancelled
                            isQueued:
                              type: boolean
                            isCancelled:
                              type: boolean
                            isCompleted:
                              type: boolean
                            isFailed:
                              type: boolean
                            inProgress:
                              type: boolean
                          required:
                            - isQueued
                            - isCancelled
                            - isCompleted
                            - isFailed
                            - inProgress
                          additionalProperties: false
                      required:
                        - agent
                        - agentId
                        - createdAt
                        - externalId
                        - id
                        - kind
                        - lastQueuedAt
                        - lastSeenAt
                        - level
                        - projectId
                        - title
                        - updatedAt
                        - visibility
                        - artifacts
                        - diffSummary
                        - isPinned
                        - project
                        - sessionSource
                        - sourcePullRequest
                        - state
                      additionalProperties: false
                  nextCursor:
                    type:
                      - string
                      - 'null'
                  totalCount:
                    type: integer
                    minimum: 0
                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

````