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

# List session history

> Paginated finished-session records ordered by ended time, then session ID, descending. Cursors are opaque and account-bound. History end time is not cleanup confirmation; use the create receipt for that.



## OpenAPI

````yaml /openapi.json get /history/page
openapi: 3.1.0
info:
  title: Phone Harness API
  version: '2026-09-14'
  description: >-
    Public account and disposable Android session API. Open beta. Create
    responses are asynchronous; session duration includes provisioning, while
    billing begins at readiness. This specification documents the current
    supported client contract, not internal management interfaces. All example
    IDs, links, timestamps, limits, prices and digests are illustrative, not
    live credentials, measurements, or account entitlements.
  contact:
    name: Phone Harness support
    email: support@phone-harness.com
servers:
  - url: https://api.phone-harness.com
    description: Production beta
security:
  - ApiKey: []
tags:
  - name: Sessions
  - name: Phone
  - name: ADB
  - name: Account
  - name: History
  - name: Service
paths:
  /history/page:
    get:
      tags:
        - History
      summary: List session history
      description: >-
        Paginated finished-session records ordered by ended time, then session
        ID, descending. Cursors are opaque and account-bound. History end time
        is not cleanup confirmation; use the create receipt for that.
      operationId: list-history-page
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 40
          description: Page size.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: The previous next_cursor, passed unchanged.
      responses:
        '200':
          description: History page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoryPage'
              example:
                items:
                  - sid: abc123def456
                    uid: exampleuser1
                    provider: shlut
                    device: Android
                    phone: null
                    created: 1800000000
                    ready: 1800000140
                    last: 1800000200
                    ended: 1800000230
                    end_reason: released
                    billing_mode: metered
                    cost_cents: 70
                    usage_minutes: 2
                    billable_minutes: 2
                next_cursor: null
        '400':
          description: Invalid limit, cursor, or query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Bad or missing bearer credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Account access denied or rental access unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected service error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    HistoryPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/HistoryItem'
        next_cursor:
          type:
            - string
            - 'null'
          description: Opaque account-bound cursor. Null at the end.
      required:
        - items
        - next_cursor
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable public error.
        code:
          type: string
          description: Present only for errors with a stable code.
        state:
          type: string
        unsupported:
          type: boolean
        outcome:
          type: string
          enum:
            - unknown
            - installed
        id:
          type: string
          description: Session ID if a create receipt exists.
        request_key:
          type: string
        cleanup_complete:
          type: boolean
        balance_cents:
          type: integer
        session:
          type: string
        session_limit:
          type: integer
        active_session_count:
          type: integer
        available_session_slots:
          type: integer
      required:
        - error
    HistoryItem:
      type: object
      properties:
        sid:
          type: string
          description: Session ID; history uses sid rather than id.
        uid:
          type: string
        provider:
          type: string
        device:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        created:
          type: number
          description: Session admission. Unix time in seconds.
        ready:
          type:
            - number
            - 'null'
          description: >-
            Readiness. Null if the session never became ready. Unix time in
            seconds.
        last:
          type: number
          description: Last recorded API activity. Unix time in seconds.
        ended:
          type: number
          description: >-
            Recorded end of the session, not proof of physical cleanup
            completion. Unix time in seconds.
        end_reason:
          type:
            - string
            - 'null'
        billing_mode:
          type: string
          enum:
            - metered
            - disabled
        cost_cents:
          type: integer
          description: Recorded credit debits for this session in US cents.
        usage_minutes:
          type: integer
          description: Ready-to-ended time rounded up to whole minutes.
        billable_minutes:
          type: integer
          description: Usage minutes for metered sessions; zero for disabled billing.
      required:
        - sid
        - uid
        - provider
        - device
        - phone
        - created
        - ready
        - last
        - ended
        - end_reason
        - billing_mode
        - cost_cents
        - usage_minutes
        - billable_minutes
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        Phone Harness account API key (pck_…). The dashboard may use a Clerk
        session JWT with the same header. Never put an account key in a URL.

````