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

# Retrieve session history

> Returns a list of session history records for the authenticated user



## OpenAPI

````yaml https://api.simli.ai/openapi.yaml get /history/sessions
openapi: 3.1.0
info:
  title: Simli
  version: 1.0.0
servers:
  - url: https://api.simli.ai/
    description: API server
security:
  - ApiKeyAuth: []
paths:
  /history/sessions:
    get:
      summary: Retrieve session history
      description: Returns a list of session history records for the authenticated user
      parameters:
        - name: start
          in: query
          description: Filter records from this Unix timestamp
          required: false
          schema:
            type: integer
            example: 1745750387
        - name: end
          in: query
          description: Filter records until this Unix timestamp
          required: false
          schema:
            type: integer
            example: 1745750408
      responses:
        '200':
          description: A list of session history records
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessions:
                    type: array
                    items:
                      $ref: '#/components/schemas/HistoryRecord'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    HistoryRecord:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Firebase unique identifier for the session
        userId:
          type: string
          description: Firebase user id
        endUserAggregator:
          type: string
          description: >-
            (optional) Aggregation identifier provided in request by customer
            for grouping their end-users
        apiKeyName:
          type: string
          description: (optional) Name of the API key used for this session
        sessionTotalTime:
          type: number
          format: double
          description: Total session duration in seconds
        startTime:
          type: integer
          description: Session start time as Unix timestamp
        endTime:
          type: integer
          description: Session end time as Unix timestamp
      required:
        - id
        - sessionTotalTime
        - startTime
        - endTime
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-simli-api-key

````