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

# Stream project events

> **Required scope:** `events:listen`

Opens a server-sent event (SSE) stream of this project's events. Every event frame carries the same event object as the events API and the exact webhook body when it is available.

Send `Accept: text/event-stream`. Resume after a disconnect by sending the last received `cursor` as `Last-Event-ID` or `cursor`. Cursors are valid for 24 hours and are bound to the organization, project and `types` filter.

With `ack=auto` (default), each event is released as soon as it is written. With `ack=manual`, at most `maxInFlight` events are outstanding until you acknowledge them; unacknowledged events produce a `backpressure` frame and then a `dropped` frame.

The stream sends a `heartbeat` frame every `heartbeatIntervalMs`. It closes with `revoked` within one heartbeat after the credential, project or feature access ends, and with `expiry` at `connectionExpiresAt` or after `idleTimeoutMs` without an event. Reconnect from the last cursor after `expiry`, `dropped` or a recoverable `gap`.

Requires `events:listen` and the Event streams beta. Organization API keys and project tokens are accepted; client tokens are rejected.



## OpenAPI

````yaml api-reference/features/operate.json GET /platform/projects/{projectId}/events/stream
openapi: 3.0.3
info:
  title: Operate API methods
  version: 1.0.0
  description: Task-focused operate methods across supported Polymorfa connection types.
servers: []
security: []
paths:
  /platform/projects/{projectId}/events/stream:
    get:
      tags:
        - Events
      summary: Stream project events
      description: >-
        **Required scope:** `events:listen`


        Opens a server-sent event (SSE) stream of this project's events. Every
        event frame carries the same event object as the events API and the
        exact webhook body when it is available.


        Send `Accept: text/event-stream`. Resume after a disconnect by sending
        the last received `cursor` as `Last-Event-ID` or `cursor`. Cursors are
        valid for 24 hours and are bound to the organization, project and
        `types` filter.


        With `ack=auto` (default), each event is released as soon as it is
        written. With `ack=manual`, at most `maxInFlight` events are outstanding
        until you acknowledge them; unacknowledged events produce a
        `backpressure` frame and then a `dropped` frame.


        The stream sends a `heartbeat` frame every `heartbeatIntervalMs`. It
        closes with `revoked` within one heartbeat after the credential, project
        or feature access ends, and with `expiry` at `connectionExpiresAt` or
        after `idleTimeoutMs` without an event. Reconnect from the last cursor
        after `expiry`, `dropped` or a recoverable `gap`.


        Requires `events:listen` and the Event streams beta. Organization API
        keys and project tokens are accepted; client tokens are rejected.
      operationId: managementStreamProjectEvents
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        - schema:
            type: string
            description: >-
              Comma-separated event types to include, or repeat the parameter. A
              trailing `*` matches a prefix, such as `message.*`. Omit for every
              type. At most 32 filters.
            example: message.*,session.connected
          required: false
          name: types
          in: query
          description: Specifies types for this query parameter.
        - schema:
            type: string
            maxLength: 4096
            description: >-
              Resume after this cursor. Equivalent to `Last-Event-ID`; if both
              are sent they must match.
          required: false
          name: cursor
          in: query
          description: |-
            Specifies cursor for this query parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | At most `4096` characters |
        - schema:
            type: string
            enum:
              - auto
              - manual
            description: >-
              `auto` (default) releases events once written. `manual` holds them
              until acknowledged.
          required: false
          name: ack
          in: query
          description: |-
            Specifies ack for this query parameter.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `auto` | Auto. |
            | `manual` | Manual. |
        - schema:
            type: string
            maxLength: 4096
            description: Resume cursor sent automatically by SSE clients after a reconnect.
          required: false
          name: Last-Event-ID
          in: header
          description: |-
            Identifier for the last event.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | At most `4096` characters |
      responses:
        '200':
          description: >-
            An SSE stream. The first frame is `ready`. `revoked`, `expiry`,
            `dropped` and `gap` frames end the connection, except a `gap` with
            reason `retention_exceeded`, which reports skipped events and the
            stream continues.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache, no-transform
          content:
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/management__PlatformAccessEventStreamFrame
        '400':
          description: >-
            Invalid parameter, or `stream_cursor_invalid` when the cursor
            belongs to another project or filter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '401':
          description: Missing or invalid credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '403':
          description: >-
            `missing_scope`, `permission_denied`, or `feature_unavailable` when
            Event streams is not enabled for the team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '406':
          description: The request did not accept `text/event-stream`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '410':
          description: >-
            `stream_cursor_expired`: the cursor is older than 24 hours.
            Reconnect without a cursor and read missed events from the events
            API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '429':
          description: >-
            `stream_connection_limit_reached` or `rate_limit_exceeded`. Follow
            `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
        '503':
          description: A required service is unavailable. Retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    management__PlatformAccessEventStreamFrame:
      oneOf:
        - $ref: '#/components/schemas/management__PlatformAccessEventStreamReadyFrame'
        - $ref: '#/components/schemas/management__PlatformAccessEventStreamEventFrame'
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamHeartbeatFrame
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamCheckpointFrame
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamBackpressureFrame
        - $ref: '#/components/schemas/management__PlatformAccessEventStreamGapFrame'
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamDroppedFrame
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamExpiryFrame
        - $ref: >-
            #/components/schemas/management__PlatformAccessEventStreamRevokedFrame
      discriminator:
        propertyName: type
        mapping:
          ready:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamReadyFrame
          event:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamEventFrame
          heartbeat:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamHeartbeatFrame
          checkpoint:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamCheckpointFrame
          backpressure:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamBackpressureFrame
          gap:
            $ref: '#/components/schemas/management__PlatformAccessEventStreamGapFrame'
          dropped:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamDroppedFrame
          expiry:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamExpiryFrame
          revoked:
            $ref: >-
              #/components/schemas/management__PlatformAccessEventStreamRevokedFrame
      description: >-
        JSON carried in the `data` field of one SSE message. The SSE `event`
        field repeats `type`.
    management__PlatformAccessPublicError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              enum:
                - invalid_parameter
                - invalid_credential
                - entitlement_required
                - method_not_allowed
                - permission_denied
                - missing_scope
                - resource_not_found
                - media_fetch_failed
                - resource_gone
                - feature_unavailable
                - stream_cursor_invalid
                - stream_cursor_expired
                - stream_connection_limit_reached
                - state_conflict
                - idempotency_conflict
                - idempotency_in_progress
                - idempotency_completed
                - idempotency_outcome_unknown
                - call_claimed
                - call_not_ringing
                - connection_limit
                - unsupported_for_connection
                - call_permission_required
                - invalid_sip_trunk
                - calls_disabled
                - sip_trunk_in_use
                - sip_trunk_revision_conflict
                - sip_trunk_limit
                - sip_unavailable
                - rate_limit_exceeded
                - internal_error
                - operation_not_supported
                - upstream_failure
                - service_unavailable
                - credential_verification_unavailable
                - session_not_ready
                - command_dispatch_failed
                - result_unknown
                - recipient_not_on_whatsapp
                - conversation_window_closed
                - template_not_approved
                - media_too_large
                - whatsapp_rate_limited
                - new_chat_limit_reached
                - whatsapp_account_restricted
                - bansafe_suspended
                - bansafe_org_suspended
                - bansafe_cold_blocked
                - bansafe_cold_held
                - bansafe_throttled
                - bansafe_daily_allowance_reached
                - bansafe_accounting_unavailable
                - bansafe_send_outcome_unknown
                - campaigns_not_entitled
              description: >-
                Stable machine-readable code for this result.


                <!-- polymorfa-input-table -->

                **Allowed values**

                | Value | Meaning |

                | --- | --- |

                | `invalid_parameter` | Invalid parameter. |

                | `invalid_credential` | Invalid credential. |

                | `entitlement_required` | Entitlement required. |

                | `method_not_allowed` | Method not allowed. |

                | `permission_denied` | Permission denied. |

                | `missing_scope` | Missing scope. |

                | `resource_not_found` | Resource not found. |

                | `media_fetch_failed` | Media fetch failed. |

                | `resource_gone` | Resource gone. |

                | `feature_unavailable` | Feature unavailable. |

                | `stream_cursor_invalid` | Stream cursor invalid. |

                | `stream_cursor_expired` | Stream cursor expired. |

                | `stream_connection_limit_reached` | Stream connection limit
                reached. |

                | `state_conflict` | State conflict. |

                | `idempotency_conflict` | Idempotency conflict. |

                | `idempotency_in_progress` | Idempotency in progress. |

                | `idempotency_completed` | Idempotency completed. |

                | `idempotency_outcome_unknown` | Idempotency outcome unknown. |

                | `call_claimed` | Call claimed. |

                | `call_not_ringing` | Call not ringing. |

                | `connection_limit` | Connection limit. |

                | `unsupported_for_connection` | Unsupported for connection. |

                | `call_permission_required` | Call permission required. |

                | `invalid_sip_trunk` | Invalid sip trunk. |

                | `calls_disabled` | Calls disabled. |

                | `sip_trunk_in_use` | Sip trunk in use. |

                | `sip_trunk_revision_conflict` | Sip trunk revision conflict. |

                | `sip_trunk_limit` | Sip trunk limit. |

                | `sip_unavailable` | Sip unavailable. |

                | `rate_limit_exceeded` | Rate limit exceeded. |

                | `internal_error` | Internal error. |

                | `operation_not_supported` | Operation not supported. |

                | `upstream_failure` | Upstream failure. |

                | `service_unavailable` | Service unavailable. |

                | `credential_verification_unavailable` | Credential
                verification unavailable. |

                | `session_not_ready` | Session not ready. |

                | `command_dispatch_failed` | Command dispatch failed. |

                | `result_unknown` | Result unknown. |

                | `recipient_not_on_whatsapp` | Recipient not on whatsapp. |

                | `conversation_window_closed` | Conversation window closed. |

                | `template_not_approved` | Template not approved. |

                | `media_too_large` | Media too large. |

                | `whatsapp_rate_limited` | Whatsapp rate limited. |

                | `new_chat_limit_reached` | New chat limit reached. |

                | `whatsapp_account_restricted` | Whatsapp account restricted. |

                | `bansafe_suspended` | Bansafe suspended. |

                | `bansafe_org_suspended` | Bansafe org suspended. |

                | `bansafe_cold_blocked` | Bansafe cold blocked. |

                | `bansafe_cold_held` | Bansafe cold held. |

                | `bansafe_throttled` | Bansafe throttled. |

                | `bansafe_daily_allowance_reached` | Bansafe daily allowance
                reached. |

                | `bansafe_accounting_unavailable` | Bansafe accounting
                unavailable. |

                | `bansafe_send_outcome_unknown` | Bansafe send outcome unknown.
                |

                | `campaigns_not_entitled` | Campaigns not entitled. |
            message:
              type: string
              description: Human-readable message associated with this result.
            param:
              type: string
              nullable: true
              description: |-
                Specifies param for this error.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            request_id:
              type: string
              description: >-
                Matches the X-Request-Id response header. Include it when you
                contact support.
            request_log_url:
              type: string
              format: uri
              description: >-
                Console page that shows this request. Returned only to
                organization and project credentials whose request was logged.


                <!-- polymorfa-input-table -->

                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Format | `uri` |
          required:
            - type
            - code
            - message
            - param
            - request_id
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Specifies docs for this management platform access public error.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
      required:
        - error
        - data
        - docs
    management__PlatformAccessEventStreamReadyFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream ready
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - ready
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `ready` | Ready. |
        projectId:
          type: string
          format: uuid
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        connectionExpiresAt:
          type: string
          format: date-time
          description: |-
            Timestamp for connection expires at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        heartbeatIntervalMs:
          type: integer
          description: >-
            Specifies heartbeat interval ms for this management platform access
            event stream ready frame.
        maxInFlight:
          type: integer
          description: >-
            Specifies max in flight for this management platform access event
            stream ready frame.
        ack:
          type: string
          enum:
            - auto
            - manual
          description: >-
            Specifies ack for this management platform access event stream ready
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `auto` | Auto. |

            | `manual` | Manual. |
        types:
          type: array
          items:
            type: string
          description: >-
            Types associated with this management platform access event stream
            ready frame.
        idleTimeoutMs:
          type: integer
          description: >-
            Specifies idle timeout ms for this management platform access event
            stream ready frame.
        resume:
          type: object
          properties:
            startPosition:
              type: string
              enum:
                - now
                - resume
              description: |-
                Specifies start position for this resume.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `now` | Now. |
                | `resume` | Resume. |
            acceptedCursor:
              type: string
              nullable: true
              description: |-
                Specifies accepted cursor for this resume.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            oldestAvailableCursor:
              type: string
              nullable: true
              description: |-
                Specifies oldest available cursor for this resume.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            cursorExpiresAt:
              type: string
              nullable: true
              format: date-time
              description: |-
                Timestamp for cursor expires at.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string`; Format: `date-time` |
                | Alternative 2 | `null` |

                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Format | `date-time` |
          required:
            - startPosition
            - acceptedCursor
            - oldestAvailableCursor
            - cursorExpiresAt
          additionalProperties: false
          description: >-
            Structured resume values for this management platform access event
            stream ready frame.
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - projectId
        - connectionExpiresAt
        - heartbeatIntervalMs
        - maxInFlight
        - ack
        - types
        - idleTimeoutMs
        - resume
      additionalProperties: false
    management__PlatformAccessEventStreamEventFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream event
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - event
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `event` | Event. |
        cursor:
          type: string
          description: Resume position after this event. Also sent as the SSE `id`.
        event:
          allOf:
            - $ref: '#/components/schemas/management__PlatformAccessStreamedEvent'
          description: >-
            Specifies event for this management platform access event stream
            event frame.
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - cursor
        - event
      additionalProperties: false
    management__PlatformAccessEventStreamHeartbeatFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream
            heartbeat frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - heartbeat
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `heartbeat` | Heartbeat. |
        serverTime:
          type: string
          format: date-time
          description: >-
            Specifies server time for this management platform access event
            stream heartbeat frame.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Format | `date-time` |
        lastCursor:
          type: string
          nullable: true
          description: >-
            Specifies last cursor for this management platform access event
            stream heartbeat frame.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - serverTime
        - lastCursor
      additionalProperties: false
    management__PlatformAccessEventStreamCheckpointFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream
            checkpoint frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - checkpoint
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `checkpoint` | Checkpoint. |
        cursor:
          type: string
          description: >-
            Specifies cursor for this management platform access event stream
            checkpoint frame.
        cursorExpiresAt:
          type: string
          format: date-time
          description: |-
            Timestamp for cursor expires at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - cursor
        - cursorExpiresAt
      additionalProperties: false
    management__PlatformAccessEventStreamBackpressureFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream
            backpressure frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - backpressure
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `backpressure` | Backpressure. |
        inFlight:
          type: integer
          description: >-
            Specifies in flight for this management platform access event stream
            backpressure frame.
        limit:
          type: integer
          description: >-
            Specifies limit for this management platform access event stream
            backpressure frame.
        graceMs:
          type: integer
          description: >-
            Specifies grace ms for this management platform access event stream
            backpressure frame.
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - inFlight
        - limit
        - graceMs
      additionalProperties: false
    management__PlatformAccessEventStreamGapFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream gap
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - gap
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `gap` | Gap. |
        requestedCursor:
          type: string
          nullable: true
          description: >-
            Specifies requested cursor for this management platform access event
            stream gap frame.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        oldestAvailableCursor:
          type: string
          nullable: true
          description: >-
            Specifies oldest available cursor for this management platform
            access event stream gap frame.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        cursorExpiresAt:
          type: string
          nullable: true
          format: date-time
          description: |-
            Timestamp for cursor expires at.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string`; Format: `date-time` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        recoverable:
          type: boolean
          description: >-
            True when reconnecting from `requestedCursor` can deliver the
            events. False when events were removed by retention.
        reason:
          type: string
          enum:
            - source_unavailable
            - state_unavailable
            - stream_unavailable
            - retention_exceeded
          description: |-
            Reason for the reported state or outcome.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `source_unavailable` | Source unavailable. |
            | `state_unavailable` | State unavailable. |
            | `stream_unavailable` | Stream unavailable. |
            | `retention_exceeded` | Retention exceeded. |
        missedEvents:
          type: integer
          description: >-
            Specifies missed events for this management platform access event
            stream gap frame.
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - requestedCursor
        - oldestAvailableCursor
        - cursorExpiresAt
        - recoverable
        - reason
      additionalProperties: false
    management__PlatformAccessEventStreamDroppedFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream dropped
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - dropped
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `dropped` | Dropped. |
        count:
          type: integer
          description: Number of matching resources.
        fromCursor:
          type: string
          description: >-
            Specifies from cursor for this management platform access event
            stream dropped frame.
        toCursor:
          type: string
          description: >-
            Specifies to cursor for this management platform access event stream
            dropped frame.
        recoverable:
          type: boolean
          enum:
            - true
          description: |-
            Whether recoverable.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `true` | True. |
        reason:
          type: string
          enum:
            - ack_timeout
          description: |-
            Reason for the reported state or outcome.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `ack_timeout` | Ack timeout. |
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - count
        - fromCursor
        - toCursor
        - recoverable
        - reason
      additionalProperties: false
    management__PlatformAccessEventStreamExpiryFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream expiry
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - expiry
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `expiry` | Expiry. |
        expiredAt:
          type: string
          format: date-time
          description: |-
            Timestamp for expired at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        lastCursor:
          type: string
          nullable: true
          description: >-
            Specifies last cursor for this management platform access event
            stream expiry frame.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        reason:
          type: string
          enum:
            - connection_expired
            - idle_timeout
          description: |-
            Reason for the reported state or outcome.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `connection_expired` | Connection expired. |
            | `idle_timeout` | Idle timeout. |
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - expiredAt
        - lastCursor
        - reason
      additionalProperties: false
    management__PlatformAccessEventStreamRevokedFrame:
      type: object
      properties:
        v:
          type: number
          enum:
            - 1
          description: >-
            Specifies v for this management platform access event stream revoked
            frame.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `1` | 1. |
        streamId:
          type: string
          format: uuid
          description: |-
            Identifier for the stream.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sequence:
          type: integer
          minimum: 1
          description: >-
            Frame counter for this connection. It restarts at 1 on every
            connection.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `1` or greater |
        sentAt:
          type: string
          format: date-time
          description: |-
            Timestamp for sent at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        type:
          type: string
          enum:
            - revoked
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `revoked` | Revoked. |
        lastCursor:
          type: string
          nullable: true
          description: >-
            Specifies last cursor for this management platform access event
            stream revoked frame.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        reason:
          type: string
          enum:
            - principal_revoked
          description: |-
            Reason for the reported state or outcome.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `principal_revoked` | Principal revoked. |
      required:
        - v
        - streamId
        - sequence
        - sentAt
        - type
        - lastCursor
        - reason
      additionalProperties: false
    management__PlatformAccessStreamedEvent:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: |-
            Identifier for this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        organizationId:
          type: string
          format: uuid
          description: |-
            Identifier for the organization.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        projectId:
          type: string
          format: uuid
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        type:
          type: string
          minLength: 1
          maxLength: 128
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `128` characters |
        source:
          type: string
          enum:
            - runtime
            - platform
            - test
          description: |-
            Specifies source for this management platform access streamed event.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `runtime` | Runtime. |
            | `platform` | Platform. |
            | `test` | Test. |
        environment:
          type: string
          enum:
            - development
            - production
          description: >-
            Specifies environment for this management platform access streamed
            event.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `development` | Development. |

            | `production` | Production. |
        createdAt:
          type: string
          format: date-time
          description: |-
            ISO 8601 timestamp when this resource was created.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        payloadAvailability:
          type: string
          enum:
            - available
            - not_retained
            - unavailable
          description: >-
            `available` when `payload` is present. `not_retained` when hosted
            message storage did not keep the body. `unavailable` when the body
            is too large or its storage authority has ended.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `available` | Available. |

            | `not_retained` | Not retained. |

            | `unavailable` | Unavailable. |
        payload:
          type: object
          nullable: true
          properties:
            encoding:
              type: string
              enum:
                - base64
              description: |-
                Specifies encoding for this payload.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `base64` | Base64. |
            contentType:
              type: string
              enum:
                - application/json
              description: >-
                IANA media type that matches the payload.


                <!-- polymorfa-input-table -->

                **Allowed values**

                | Value | Meaning |

                | --- | --- |

                | `application/json` | Application/json. |


                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Media type | IANA `type/subtype` value matching the payload,
                such as `image/jpeg`, `video/mp4`, `audio/ogg`, or
                `application/pdf` |
            data:
              type: string
              format: byte
              description: |-
                Base64 of the exact webhook body for this event.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Format | `byte` |
          required:
            - encoding
            - contentType
            - data
          additionalProperties: false
          description: >-
            Structured payload carried by this event or operation.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `object`; Field `encoding`: `base64`; Field
            `contentType`: `application/json`; Required fields: `encoding`,
            `contentType`, `data` |

            | Alternative 2 | `null` |
        replayableUntil:
          type: string
          nullable: true
          format: date-time
          description: >-
            Specifies replayable until for this management platform access
            streamed event.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Format: `date-time` |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Format | `date-time` |
        metadataExpiresAt:
          type: string
          format: date-time
          description: |-
            Timestamp for metadata expires at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
      required:
        - id
        - organizationId
        - projectId
        - type
        - source
        - environment
        - createdAt
        - payloadAvailability
        - payload
        - replayableUntil
        - metadataExpiresAt
      additionalProperties: false
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Send your team API key or project token as `Authorization: Bearer
        <token>`. The credential must have the required permissions. Project
        tokens can access only their own project.

````