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

# Session Document Events

> Poll for cross-session document updates: returns `document_updated` events for documents
THIS session holds that OTHER sessions committed since `after_id`. The client polls this
(~every 1-2s while a doc is open) and re-fetches the changed document's content so all open
sessions converge without a refresh. Excludes this session's own writes by default (the web UI
already has its own changes); a REST/MCP integrator can pass `include_own=true` to receive its
own events too. REST-only — a lightweight poll, deliberately NOT an MCP tool and NOT a held
SSE connection (keeps the per-instance connection budget free).



## OpenAPI

````yaml /openapi.json get /v1/sessions/{session_id}/doc-events
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/{session_id}/doc-events:
    get:
      tags:
        - v1
        - sessions
      summary: Session Document Events
      description: >-
        Poll for cross-session document updates: returns `document_updated`
        events for documents

        THIS session holds that OTHER sessions committed since `after_id`. The
        client polls this

        (~every 1-2s while a doc is open) and re-fetches the changed document's
        content so all open

        sessions converge without a refresh. Excludes this session's own writes
        by default (the web UI

        already has its own changes); a REST/MCP integrator can pass
        `include_own=true` to receive its

        own events too. REST-only — a lightweight poll, deliberately NOT an MCP
        tool and NOT a held

        SSE connection (keeps the per-instance connection budget free).
      operationId: session_document_events_v1_sessions__session_id__doc_events_get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: after_id
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Return events with id greater than this (the poll cursor).
            default: 0
            title: After Id
          description: Return events with id greater than this (the poll cursor).
        - name: include_own
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Integrator opt-out: when true, ALSO return this session's own
              document_updated events (default false excludes them — the web UI
              never needs its own writes echoed). A REST/MCP integration that
              writes on one connection and polls on another, or wants a complete
              change feed for the docs it holds, sets this true.
            default: false
            title: Include Own
          description: >-
            Integrator opt-out: when true, ALSO return this session's own
            document_updated events (default false excludes them — the web UI
            never needs its own writes echoed). A REST/MCP integration that
            writes on one connection and polls on another, or wants a complete
            change feed for the docs it holds, sets this true.
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````