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

# Ingest browser analytics events

> Durably stores a bounded browser event batch. Authentication is optional: a purpose-limited analytics ingest bearer token attributes the session, while an omitted credential stores it unattributed. Project API keys are not accepted.



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json post /analytics/events
openapi: 3.1.0
info:
  title: Deposit Service API
  version: 1.0.0
  description: >-
    Cross-chain deposit processing service with automatic token bridging and gas
    sponsorship
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /analytics/events:
    post:
      tags:
        - Analytics
      summary: Ingest browser analytics events
      description: >-
        Durably stores a bounded browser event batch. Authentication is
        optional: a purpose-limited analytics ingest bearer token attributes the
        session, while an omitted credential stores it unattributed. Project API
        keys are not accepted.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsEventsRequest'
      responses:
        '200':
          description: The complete batch is durably represented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsEventsResponse'
        '400':
          description: Malformed or invalid batch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: A presented credential is invalid or not permitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Session attribution, envelope, event ID, or sequence conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsConflictResponse'
        '503':
          description: Analytics persistence is temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - analyticsIngestBearer: []
        - {}
components:
  schemas:
    AnalyticsEventsRequest:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticsEvent'
          minItems: 1
          maxItems: 50
      required:
        - events
      additionalProperties: false
    AnalyticsEventsResponse:
      type: object
      properties:
        accepted:
          type: integer
          minimum: 1
          maximum: 50
      required:
        - accepted
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              code:
                type: string
            required:
              - message
      required:
        - error
    AnalyticsConflictResponse:
      type: object
      properties:
        error:
          type: string
          enum:
            - Analytics event conflict
        code:
          type: string
          enum:
            - SESSION_ATTRIBUTION_CONFLICT
            - SESSION_ENVELOPE_CONFLICT
            - EVENT_ID_CONFLICT
            - SESSION_SEQUENCE_CONFLICT
      required:
        - error
        - code
    AnalyticsEvent:
      oneOf:
        - type: object
          properties:
            event_id:
              type: string
              format: uuid
            session_id:
              type: string
              format: uuid
            sequence:
              type: integer
              minimum: 0
              maximum: 2147483647
            type:
              type: string
              minLength: 1
              maxLength: 128
            timestamp:
              type: string
              format: date-time
            widget_version:
              type: string
              minLength: 1
              maxLength: 64
            proxy_origin:
              type: string
              maxLength: 2048
              description: >-
                Canonical HTTP(S) origin only (for example
                https://app.example.com), without credentials, path, query,
                fragment, or trailing slash.
              example: https://app.example.com
            payload:
              type: object
              additionalProperties: true
              description: >-
                JSON object limited to 16 KiB serialized, 10 recursive levels,
                and 4096 characters per key or string value.
            modal:
              type: string
              enum:
                - deposit
            session_properties:
              type: object
              properties:
                enabled_funding_methods:
                  type: array
                  items:
                    type: string
                    enum:
                      - wallet
                      - transfer
                      - fiat_onramp
                      - exchange_connect
                      - asset_migration
                  maxItems: 5
                wallet_integration:
                  type: string
                  enum:
                    - modal_connected
                    - host_supplied
                    - none
                fiat_methods:
                  oneOf:
                    - type: object
                      properties:
                        source:
                          type: string
                          enum:
                            - backend_resolved
                      required:
                        - source
                      additionalProperties: false
                    - type: object
                      properties:
                        source:
                          type: string
                          enum:
                            - configured
                        identifiers:
                          type: array
                          items:
                            type: string
                            maxLength: 4096
                      required:
                        - source
                        - identifiers
                      additionalProperties: false
                asset_migration_providers:
                  type: array
                  items:
                    type: string
                    maxLength: 4096
                initial_asset_migration:
                  type:
                    - string
                    - 'null'
                  maxLength: 4096
                gasless_wallet_flow_enabled:
                  type: boolean
                presentation:
                  type: string
                  enum:
                    - inline
                    - overlay
                overlay_close_enabled:
                  type: boolean
                target_chain:
                  type: string
                  pattern: ^[a-z0-9]+:[a-zA-Z0-9]+$
                  description: CAIP-2 chain identifier (e.g. "eip155:8453")
                  example: eip155:8453
                target_token:
                  type: string
                  maxLength: 64
                  description: >-
                    On-chain token identity for the session target: an EVM or
                    HyperEVM ERC-20 address, a HyperCore spot token id, a Solana
                    mint, a Tron TRC-20 address, a Stellar Asset Contract, or a
                    native-asset sentinel. Hex values are stored lower-cased;
                    base58 and base32 are byte-exact.
                  example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
                prefills:
                  type: object
                  properties:
                    source_chain:
                      type: boolean
                    source_token:
                      type: boolean
                    amount:
                      type: boolean
                    initial_asset_migration:
                      type: boolean
                  required:
                    - source_chain
                    - source_token
                    - amount
                    - initial_asset_migration
                  additionalProperties: false
              required:
                - enabled_funding_methods
                - wallet_integration
                - fiat_methods
                - asset_migration_providers
                - initial_asset_migration
                - gasless_wallet_flow_enabled
                - presentation
                - overlay_close_enabled
                - prefills
              additionalProperties: false
            funding_method:
              type:
                - string
                - 'null'
              enum:
                - wallet
                - transfer
                - fiat_onramp
                - exchange_connect
                - asset_migration
                - null
          required:
            - event_id
            - session_id
            - sequence
            - type
            - timestamp
            - widget_version
            - proxy_origin
            - payload
            - modal
            - session_properties
            - funding_method
          additionalProperties: false
        - type: object
          properties:
            event_id:
              type: string
              format: uuid
            session_id:
              type: string
              format: uuid
            sequence:
              type: integer
              minimum: 0
              maximum: 2147483647
            type:
              type: string
              minLength: 1
              maxLength: 128
            timestamp:
              type: string
              format: date-time
            widget_version:
              type: string
              minLength: 1
              maxLength: 64
            proxy_origin:
              type: string
              maxLength: 2048
              description: >-
                Canonical HTTP(S) origin only (for example
                https://app.example.com), without credentials, path, query,
                fragment, or trailing slash.
              example: https://app.example.com
            payload:
              type: object
              additionalProperties: true
              description: >-
                JSON object limited to 16 KiB serialized, 10 recursive levels,
                and 4096 characters per key or string value.
            modal:
              type: string
              enum:
                - withdraw
            session_properties:
              type: object
              properties:
                presentation:
                  type: string
                  enum:
                    - inline
                    - overlay
                overlay_close_enabled:
                  type: boolean
                target_chain:
                  type: string
                  pattern: ^[a-z0-9]+:[a-zA-Z0-9]+$
                  description: CAIP-2 chain identifier (e.g. "eip155:8453")
                  example: eip155:8453
                target_token:
                  type: string
                  maxLength: 64
                  description: >-
                    On-chain token identity for the session target: an EVM or
                    HyperEVM ERC-20 address, a HyperCore spot token id, a Solana
                    mint, a Tron TRC-20 address, a Stellar Asset Contract, or a
                    native-asset sentinel. Hex values are stored lower-cased;
                    base58 and base32 are byte-exact.
                  example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
                prefills:
                  type: object
                  properties:
                    target_chain:
                      type: boolean
                    target_token:
                      type: boolean
                    recipient:
                      type: boolean
                    amount:
                      type: boolean
                  required:
                    - target_chain
                    - target_token
                    - recipient
                    - amount
                  additionalProperties: false
              required:
                - presentation
                - overlay_close_enabled
                - prefills
              additionalProperties: false
          required:
            - event_id
            - session_id
            - sequence
            - type
            - timestamp
            - widget_version
            - proxy_origin
            - payload
            - modal
            - session_properties
          additionalProperties: false
        - type: object
          properties:
            event_id:
              type: string
              format: uuid
            session_id:
              type: string
              format: uuid
            sequence:
              type: integer
              minimum: 0
              maximum: 2147483647
            type:
              type: string
              minLength: 1
              maxLength: 128
            timestamp:
              type: string
              format: date-time
            widget_version:
              type: string
              minLength: 1
              maxLength: 64
            proxy_origin:
              type: string
              maxLength: 2048
              description: >-
                Canonical HTTP(S) origin only (for example
                https://app.example.com), without credentials, path, query,
                fragment, or trailing slash.
              example: https://app.example.com
            payload:
              type: object
              additionalProperties: true
              description: >-
                JSON object limited to 16 KiB serialized, 10 recursive levels,
                and 4096 characters per key or string value.
            modal:
              type: string
              enum:
                - claim
            session_properties:
              type: object
              properties:
                presentation:
                  type: string
                  enum:
                    - inline
                    - overlay
                overlay_close_enabled:
                  type: boolean
                prefills:
                  type: object
                  properties:
                    transaction_hash:
                      type: boolean
                    refund_destination:
                      type: boolean
                  required:
                    - transaction_hash
                    - refund_destination
                  additionalProperties: false
              required:
                - presentation
                - overlay_close_enabled
                - prefills
              additionalProperties: false
          required:
            - event_id
            - session_id
            - sequence
            - type
            - timestamp
            - widget_version
            - proxy_origin
            - payload
            - modal
            - session_properties
          additionalProperties: false
  securitySchemes:
    analyticsIngestBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Optional five-minute analytics ingest token. Omit it to store an
        unattributed session.

````