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

# Stream the org's change notices

> The realtime notices of the token's org that its principal may read, as server-sent events. Each message's id is the resume cursor (send it back as Last-Event-ID), its event line the notice's event name, its data one ChangeFrame. On the org topic a notice about an account reaches only a seat that can open the account, and a notice about no account only when its event is org-wide. A Last-Event-ID older than the stream's retained window answers one resync frame first: refetch what the page shows. `: ka` comes every 15 s; `: end` closes the window at the token's expiry or when the server restarts, after which the reader mints a new token and reconnects with Last-Event-ID. Browsers on an allowed origin may call it directly (CORS).



## OpenAPI

````yaml /openapi.generated.json get /events/stream
openapi: 3.1.0
info:
  description: >-
    Public API reference. Generated from apps/engine/openapi.yaml by make
    docs-openapi-write. Do not edit.
  title: Nexio platform API
  version: '1'
servers:
  - url: https://api.usenexio.com
security: []
tags:
  - name: Access
  - name: Catalog
  - name: Conversations
  - name: Documents
  - name: Engines
  - name: Events
  - name: Feedback
  - name: Graph
  - name: Records
  - name: Roadmap
  - name: Runs
  - name: Webhooks
  - name: accounts
  - name: actions
  - name: activities
  - name: activity-feed
  - name: attachments
  - name: audit
  - name: benefit-plans
  - name: billing-transactions
  - name: carrier_documents
  - name: certificate-holders
  - name: certificate_drafts
  - name: certificates
  - name: change_feed
  - name: claims
  - name: classes
  - name: codes
  - name: commission_facts
  - name: connections
  - name: contacts
  - name: contingencies
  - name: conversations
  - name: customer
  - name: customer_contacts
  - name: deals
  - name: dependents
  - name: document_extractions
  - name: documents
  - name: drivers
  - name: eforms
  - name: employees
  - name: events
  - name: feature_requests
  - name: form-templates
  - name: invoices
  - name: leads
  - name: line_schedules_other
  - name: loss_history
  - name: machines
  - name: markets
  - name: motor-carriers
  - name: notes
  - name: opportunities
  - name: opportunity-signals
  - name: pages
  - name: personal_lines_detail
  - name: placement_choices
  - name: placement_feedback
  - name: placements
  - name: policies
  - name: policy_parties
  - name: policy_personnel
  - name: policy_transactions
  - name: premium_rows
  - name: procedures
  - name: proposals
  - name: quote_comparisons
  - name: quotes
  - name: records
  - name: register-views
  - name: renewal-entries
  - name: risk_review_choices
  - name: rollups
  - name: seats
  - name: sec-filings
  - name: service_agreements
  - name: submissions
  - name: suspenses
  - name: tasks
  - name: umbrella_underlying
  - name: underwriting_questions
  - name: uploaded_documents
  - name: vehicles
  - name: workflows
paths:
  /events/stream:
    get:
      tags:
        - Events
      summary: Stream the org's change notices
      description: >-
        The realtime notices of the token's org that its principal may read, as
        server-sent events. Each message's id is the resume cursor (send it back
        as Last-Event-ID), its event line the notice's event name, its data one
        ChangeFrame. On the org topic a notice about an account reaches only a
        seat that can open the account, and a notice about no account only when
        its event is org-wide. A Last-Event-ID older than the stream's retained
        window answers one resync frame first: refetch what the page shows. `:
        ka` comes every 15 s; `: end` closes the window at the token's expiry or
        when the server restarts, after which the reader mints a new token and
        reconnects with Last-Event-ID. Browsers on an allowed origin may call it
        directly (CORS).
      operationId: streamEvents
      parameters:
        - description: >-
            Resume after this frame id (&lt;ms&gt;-&lt;seq&gt;, an id this
            stream sent). When absent, Last-Event-ID is used; when both are
            absent the stream starts at the live tail.
          explode: false
          in: query
          name: after
          schema:
            description: >-
              Resume after this frame id (&lt;ms&gt;-&lt;seq&gt;, an id this
              stream sent). When absent, Last-Event-ID is used; when both are
              absent the stream starts at the live tail.
            type: string
        - description: >-
            The id of the last frame the reader applied. Read only when after is
            absent.
          in: header
          name: Last-Event-ID
          schema:
            description: >-
              The id of the last frame the reader applied. Read only when after
              is absent.
            type: string
      responses:
        '200':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChangeFrame'
          description: >-
            An event stream. Each message carries id (the resume cursor), event
            (the frame type) and data (one ChangeFrame as JSON). `: ka` comments
            keep an idle stream open; a final `: end` comment closes the
            server's window, after which the reader resubscribes with after= its
            last id if it needs more.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Service Unavailable
      security:
        - bearer: []
components:
  schemas:
    ChangeFrame:
      description: One frame of the stream, discriminated by kind.
      discriminator:
        mapping:
          notice: '#/components/schemas/ChangeFrameNotice'
          resync: '#/components/schemas/ChangeFrameResync'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/ChangeFrameNotice'
        - $ref: '#/components/schemas/ChangeFrameResync'
    ErrorEnvelope:
      additionalProperties: false
      properties:
        code:
          description: The stable machine-readable error code. One meaning forever.
          type: string
        details:
          description: Structured detail for the code.
        message:
          description: A human-readable sentence about this occurrence.
          type: string
      required:
        - code
        - message
      type: object
    ChangeFrameNotice:
      additionalProperties: false
      properties:
        account_id:
          description: The book account the notice is about, or null.
          type:
            - string
            - 'null'
        event:
          description: >-
            The notice's event name, also the event line (record.changed,
            pipeline.complete).
          type: string
        kind:
          description: notice.
          enum:
            - notice
          type: string
        outbox_id:
          description: >-
            The notice's source row, or null. A retried publish can repeat a
            notice under a new event id; the reader drops a repeat by outbox_id.
          type:
            - string
            - 'null'
        payload:
          description: >-
            The notice: ids, status, counts and times only, never record
            content. Read the content again through the scoped API read.
        run_id:
          description: The run the notice is about, or null.
          type:
            - string
            - 'null'
        topic:
          description: >-
            The token topic the notice matched: org, run:&lt;id&gt; or
            record:&lt;family&gt;:&lt;id&gt;.
          type: string
      required:
        - kind
        - topic
        - event
        - account_id
        - run_id
        - outbox_id
        - payload
      type: object
    ChangeFrameResync:
      additionalProperties: false
      properties:
        kind:
          description: resync.
          enum:
            - resync
          type: string
      required:
        - kind
      type: object
  securitySchemes:
    bearer:
      description: The org's platform API key.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.