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

# Mint a stream token

> A 10-minute, read-only token for GET /events/stream, for this org and the acting principal (Nexio-Act-As; in View as, the target, with the operator checked again on every connect). The org topic needs an active seat: a pending or refused seat answers 403 seat_required. Run and record topics need no seat; the app checks ownership finer than the org before it mints. Server to server: browsers never call it.



## OpenAPI

````yaml /openapi.generated.json post /events/stream-tokens
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-tokens:
    post:
      tags:
        - Events
      summary: Mint a stream token
      description: >-
        A 10-minute, read-only token for GET /events/stream, for this org and
        the acting principal (Nexio-Act-As; in View as, the target, with the
        operator checked again on every connect). The org topic needs an active
        seat: a pending or refused seat answers 403 seat_required. Run and
        record topics need no seat; the app checks ownership finer than the org
        before it mints. Server to server: browsers never call it.
      operationId: createEventsStreamToken
      parameters:
        - description: >-
            The member the read is made for (a WorkOS user id). Unset keeps the
            org-wide posture the key alone grants.
          in: header
          name: Nexio-Act-As
          schema:
            description: >-
              The member the read is made for (a WorkOS user id). Unset keeps
              the org-wide posture the key alone grants.
            type: string
        - description: >-
            The acting member's verified email, lowercased. Ignored without
            Nexio-Act-As.
          in: header
          name: Nexio-Act-As-Email
          schema:
            description: >-
              The acting member's verified email, lowercased. Ignored without
              Nexio-Act-As.
            type: string
        - description: The calling application (workbench).
          in: header
          name: Nexio-Consumer
          schema:
            description: The calling application (workbench).
            type: string
        - description: The calling application's build.
          in: header
          name: Nexio-Consumer-Build
          schema:
            description: The calling application's build.
            type: string
        - description: The access vocabulary hash the calling build was generated against.
          in: header
          name: Nexio-Consumer-Vocabulary
          schema:
            description: >-
              The access vocabulary hash the calling build was generated
              against.
            type: string
        - description: >-
            A caller-chosen request id, echoed in the Nexio-Request-Id response
            header.
          in: header
          name: Nexio-Request-Id
          schema:
            description: >-
              A caller-chosen request id, echoed in the Nexio-Request-Id
              response header.
            type: string
        - description: >-
            The caller's remaining budget for this request, in whole
            milliseconds (1 to 10 digits, greater than zero), relative to
            receipt. The engine stops work at the shorter of this and the
            route's own budget, and answers 504 request_timeout when it expires.
            A value above the route budget is capped to it; a malformed value is
            ignored.
          in: header
          name: Nexio-Timeout
          schema:
            description: >-
              The caller's remaining budget for this request, in whole
              milliseconds (1 to 10 digits, greater than zero), relative to
              receipt. The engine stops work at the shorter of this and the
              route's own budget, and answers 504 request_timeout when it
              expires. A value above the route budget is capped to it; a
              malformed value is ignored.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventsStreamTokenRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsStreamToken'
          description: OK
        '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
        '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:
    EventsStreamTokenRequest:
      additionalProperties: false
      properties:
        session:
          description: >-
            The app's own id for the browser session the token is for. Open
            streams are capped per principal and session, so name it when one
            person or seat signs in from several browsers. The token carries
            only its hash.
          maxLength: 256
          type: string
        topics:
          description: >-
            ["org"] for the org feed, or one to 20 topics, each run:&lt;run
            id&gt; or record:&lt;family&gt;:&lt;id&gt;.
          items:
            type: string
          maxItems: 20
          minItems: 1
          type:
            - array
            - 'null'
      required:
        - topics
      type: object
    EventsStreamToken:
      additionalProperties: false
      properties:
        expires_at:
          description: >-
            The token's expiry, 10 minutes after the mint. The stream closes
            with : end at this time; mint a new token and reconnect with
            Last-Event-ID.
          format: date-time
          type: string
        stream_url:
          description: The absolute URL of the stream.
          type: string
        token:
          description: >-
            The bearer for GET /events/stream. Read-only, this org, this
            principal, these topics.
          type: string
        topics:
          description: The topics the token reads.
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - token
        - expires_at
        - stream_url
        - topics
      type: object
    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
  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.