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

# Stream Interactions

> The Organization's events as server-sent events, from where the reader left off.

Each event is one `siem_event` frame whose `id` is its cursor, so a client
that reconnects with `Last-Event-ID` (as EventSource does) resumes after
the last event it received. A comment line every few seconds keeps idle
connections open.



## OpenAPI

````yaml /api-reference/openapi-developer.json get /api/v1/interactions/stream
openapi: 3.1.0
info:
  title: PromptGuard Developer API
  description: >-
    Public API for developers to integrate PromptGuard security into their
    applications
  version: 1.0.0
servers:
  - url: https://api.promptguard.co
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/interactions/stream:
    get:
      tags:
        - SIEM export
      summary: Stream Interactions
      description: >-
        The Organization's events as server-sent events, from where the reader
        left off.


        Each event is one `siem_event` frame whose `id` is its cursor, so a
        client

        that reconnects with `Last-Event-ID` (as EventSource does) resumes after

        the last event it received. A comment line every few seconds keeps idle

        connections open.
      operationId: stream_interactions_api_v1_interactions_stream_get
      parameters:
        - name: alerts_only
          in: query
          required: false
          schema:
            type: boolean
            description: Only events that raised an alert.
            default: false
            title: Alerts Only
          description: Only events that raised an alert.
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: 'Read events from this time (ISO 8601). Default: 24 hours ago.'
            title: Since
          description: 'Read events from this time (ISO 8601). Default: 24 hours ago.'
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: '`next_cursor` from the previous page; replaces `since`.'
            title: Cursor
          description: '`next_cursor` from the previous page; replaces `since`.'
        - name: Last-Event-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Last-Event-Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Server-sent events, until the client disconnects
          content:
            text/event-stream:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        PromptGuard API key for developer endpoints. Keys start with pg_live_
        and are created in the dashboard.

````

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