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

# Event Streaming API



## OpenAPI

````yaml /openapi.json post /v1/events
openapi: 3.1.0
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - APIKey: []
tags: []
paths:
  /v1/events:
    post:
      tags: []
      summary: Event Streaming API
      parameters:
        - name: API-Version
          in: header
          description: If set, this will override the request schema to the set value
          required: false
          example: '2025-02-25'
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                anyOf:
                  - $ref: '#/components/schemas/WebEvent'
                  - $ref: '#/components/schemas/ServerEvent'
            examples: {}
        required: true
      responses:
        '202':
          description: ''
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                    description: >-
                      The type field is used to identify the error type and
                      provide a link to the documentation that describes the
                      error in more detail.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  status:
                    type: integer
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                    enum:
                      - 400
                  detail:
                    type: string
                    description: >-
                      A JSON string containing a human-readable explanation
                      specific to this occurrence of the problem.
                  instance:
                    type: string
                    description: >-
                      A JSON string containing a URI reference that identifies
                      the specific occurrence of the problem.
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
        '401':
          description: ''
          headers: {}
        '429':
          description: ''
          headers: {}
        '500':
          description: ''
          headers: {}
        '503':
          description: ''
          headers: {}
      deprecated: false
      security:
        - APIKey: []
components:
  schemas:
    WebEvent:
      type: object
      properties:
        event_name:
          type: string
        event_source:
          type: string
          enum:
            - WEB
        event_data:
          $ref: '#/components/schemas/FrontendPayload'
        event_metadata:
          $ref: '#/components/schemas/EventMetadata'
      required:
        - event_name
        - event_source
        - event_data
        - event_metadata
    ServerEvent:
      type: object
      properties:
        event_name:
          type: string
        event_source:
          type: string
          enum:
            - SERVER
        event_data:
          $ref: '#/components/schemas/BackendPayload'
        event_metadata:
          $ref: '#/components/schemas/EventMetadata'
      required:
        - event_name
        - event_source
        - event_metadata
        - event_data
    FrontendPayload:
      type: object
      properties:
        client_id:
          type: string
        page_location:
          type: string
        page_referrer:
          type: string
        session_id:
          type: string
        user_agent:
          type: string
      required:
        - client_id
        - session_id
        - page_location
        - user_agent
    EventMetadata:
      type: object
      properties:
        idempotency_key:
          type: string
          description: >-
            Only the first request with any given key will be processed; others
            will be discarded.
        identifiers:
          $ref: '#/components/schemas/Identifiers'
        consent:
          $ref: '#/components/schemas/Consent'
      required:
        - consent
        - idempotency_key
        - identifiers
    BackendPayload:
      type: object
      properties: {}
    Identifiers:
      type: object
      properties:
        user:
          type: string
        organization:
          type: string
        email:
          $ref: '#/components/schemas/HashedEmail'
        phone:
          $ref: '#/components/schemas/HashedPhone'
    Consent:
      type: object
      properties:
        analytics_storage:
          type: string
          description: User allows first-party analytics
          enum:
            - GRANTED
            - DENIED
            - UNSPECIFIED
        ad_storage:
          type: string
          enum:
            - GRANTED
            - DENIED
            - UNSPECIFIED
          description: User allows advertising optimization via Conversion API
        ad_user_data:
          type: string
          description: User allows usage of personal data for Conversion API
          enum:
            - GRANTED
            - DENIED
            - UNSPECIFIED
        ad_personalization:
          type: string
          description: User allows personalized advertising as a result of Conversion API
          enum:
            - GRANTED
            - DENIED
            - UNSPECIFIED
      required:
        - analytics_storage
        - ad_storage
        - ad_user_data
        - ad_personalization
    HashedEmail:
      type: object
      properties:
        sha256_email:
          type: string
          format: SHA-256
        sha256_canonical:
          type: string
          format: SHA-256
      required:
        - sha256_email
    HashedPhone:
      type: object
      properties:
        sha256_e164:
          type: string
          format: SHA-256
        sha256_e164_numeric:
          type: string
          format: SHA-256
      required:
        - sha256_e164
        - sha256_e164_numeric
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer
      description: |
        API key from Settings → API Key in your workspace.
        Keys are prefixed: `ov_live_` for production, `ov_test_` for test mode.

````