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

# List your active document editing sessions to resume or audit prior work.

> Returns sessions sorted by most recent activity, with message counts and last-updated timestamps. Each session represents one document with full edit history and AI conversation persisted server-side. Use to find a previous editing context to resume (then call get_session_history) or to audit your workspace.



## OpenAPI

````yaml /openapi.json get /v1/sessions
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/sessions:
    get:
      tags:
        - v1
        - mcp
        - sessions
      summary: >-
        List your active document editing sessions to resume or audit prior
        work.
      description: >-
        Returns sessions sorted by most recent activity, with message counts and
        last-updated timestamps. Each session represents one document with full
        edit history and AI conversation persisted server-side. Use to find a
        previous editing context to resume (then call get_session_history) or to
        audit your workspace.
      operationId: list_sessions
      parameters:
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by user ID (deprecated - auth determines scope)
            title: User Id
          description: Filter by user ID (deprecated - auth determines scope)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: Maximum number of sessions to return
            default: 50
            title: Limit
          description: Maximum number of sessions to return
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SessionListResponse:
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/SessionInfo'
          type: array
          title: Sessions
          description: Array of session summaries, ordered by most recent activity.
        total:
          type: integer
          title: Total
          description: Total number of sessions returned.
      type: object
      required:
        - sessions
        - total
      title: SessionListResponse
      description: List of document editing sessions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionInfo:
      properties:
        session_id:
          type: string
          title: Session Id
          description: Unique session identifier.
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: User who owns this session (null for organization sessions).
        created_at:
          type: string
          title: Created At
          description: ISO 8601 timestamp when the session was created.
        last_activity:
          type: string
          title: Last Activity
          description: ISO 8601 timestamp of the most recent activity.
        message_count:
          type: integer
          title: Message Count
          description: Total number of messages in this session.
        preview:
          type: string
          title: Preview
          description: Preview of the first user message (up to 100 characters).
      type: object
      required:
        - session_id
        - created_at
        - last_activity
        - message_count
        - preview
      title: SessionInfo
      description: Summary of a document editing session.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````