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

# Log conversion events

> Log one or more conversion or marketing events for an advertiser. Accepts up to 10,000 events per call, scoped to an event source previously synced via sync_event_sources. Implements the ADCP log_event spec.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /advertisers/{advertiserId}/log-event
openapi: 3.0.0
info:
  title: Scope3 Buyer API
  version: 2.0.0
  description: |-
    REST API for advertisers to manage advertisers, campaigns, and reporting.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.interchange.io/api/v2/buyer`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/buyer` with three tools:
    - `initialize`: Start an MCP session
    - `api_call`: Make REST API calls
    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/buyer
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Advertisers
    description: Manage advertisers
  - name: Product Discovery
    description: Discover and select products
  - name: Campaigns
    description: Manage advertising campaigns
  - name: Creatives
    description: Build, manage, and sync campaign creatives via AdCP Creative Protocol
  - name: Reporting
    description: Access performance metrics
  - name: Event Sources
    description: >-
      Manage event source configurations and log conversion/marketing events for
      attribution
  - name: Property Lists
    description: Validate property lists against AAO registry
  - name: Sales Agents
    description: View and connect sales agents
  - name: Measurement
    description: Measurement sources, records, context, and freshness
  - name: Syndication
    description: Syndicate resources to ADCP agents
  - name: Tasks
    description: Track async operation status
  - name: Planning Briefs
    description: >-
      Share prospective briefs with publishers and collect their
      fit/quote/clarify/decline/book responses (gated by the
      demand-supply-signals flag).
  - name: Buyer Billing
    description: >-
      Consolidated invoicing for buyers — invoices and pending invoice items
      issued by Scope3 across the buyer customer.
  - name: MCP
    description: Model Context Protocol endpoints for AI agents
paths:
  /advertisers/{advertiserId}/log-event:
    post:
      tags:
        - Event Sources
      summary: Log conversion events
      description: >-
        Log one or more conversion or marketing events for an advertiser.
        Accepts up to 10,000 events per call, scoped to an event source
        previously synced via sync_event_sources. Implements the ADCP log_event
        spec.
      operationId: logEvent
      parameters:
        - in: path
          name: advertiserId
          schema:
            description: Unique identifier for the advertiser
            example: '12345'
            type: string
            minLength: 1
          required: true
          description: Unique identifier for the advertiser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogEventRequest'
      responses:
        '200':
          description: Log conversion events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogEventResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    LogEventRequest:
      description: Request body for logging conversion or marketing events (ADCP spec)
      type: object
      properties:
        event_source_id:
          description: Event source configured on the account via sync_event_sources
          example: es_abc123
          type: string
          minLength: 1
          maxLength: 256
        events:
          description: Events to log (up to 10,000 per call)
          minItems: 1
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/LogEventObject'
        test_event_code:
          description: Test event code for validation without affecting production data
          type: string
          maxLength: 256
      required:
        - event_source_id
        - events
    LogEventResponse:
      description: Response from log_event
      type: object
      properties:
        events_received:
          description: Number of events received
          type: integer
          minimum: 0
          maximum: 9007199254740991
        events_processed:
          description: Number of events successfully queued
          type: integer
          minimum: 0
          maximum: 9007199254740991
        partial_failures:
          description: Events that failed validation
          type: array
          items:
            $ref: '#/components/schemas/LogEventPartialFailure'
        warnings:
          description: Non-fatal issues (low match quality, missing fields)
          type: array
          items:
            type: string
        match_quality:
          description: Overall match quality score
          type: number
          minimum: 0
          maximum: 1
      required:
        - events_received
        - events_processed
      additionalProperties: false
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    LogEventObject:
      description: A single conversion or marketing event
      type: object
      properties:
        event_id:
          description: >-
            Unique identifier for deduplication (scoped to event_type +
            event_source_id)
          example: txn_abc123
          type: string
          minLength: 1
          maxLength: 256
        event_type:
          description: Standard event type
          example: purchase
          type: string
          enum:
            - page_view
            - view_content
            - select_content
            - select_item
            - search
            - share
            - add_to_cart
            - remove_from_cart
            - viewed_cart
            - add_to_wishlist
            - initiate_checkout
            - add_payment_info
            - purchase
            - refund
            - lead
            - qualify_lead
            - close_convert_lead
            - disqualify_lead
            - complete_registration
            - subscribe
            - follow
            - content_view
            - watch_milestone
            - start_trial
            - app_install
            - app_launch
            - contact
            - schedule
            - donate
            - submit_application
            - custom
        event_time:
          description: When the event occurred (ISO 8601)
          example: '2026-03-15T14:30:00-05:00'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
        user_match:
          description: User identifiers for attribution matching
          allOf:
            - $ref: '#/components/schemas/UserMatch'
        custom_data:
          description: Event-specific data (value, currency, items)
          allOf:
            - $ref: '#/components/schemas/CustomData'
        action_source:
          description: Where the event occurred
          example: website
          type: string
          enum:
            - website
            - app
            - in_store
            - phone_call
            - system_generated
            - other
        event_source_url:
          description: >-
            URL where the event occurred (required when action_source is
            "website")
          type: string
          format: uri
        custom_event_name:
          description: Name for custom events (used when event_type is "custom")
          type: string
          maxLength: 256
      required:
        - event_id
        - event_type
        - event_time
    LogEventPartialFailure:
      description: Detail about an individual event that failed validation
      type: object
      properties:
        event_id:
          description: Identifier of the failed event
          type: string
        code:
          description: Error code
          type: string
        message:
          description: Error message
          type: string
      required:
        - event_id
        - code
        - message
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
    UserMatch:
      description: User identity fields for attribution matching
      type: object
      properties:
        uids:
          description: Universal ID values (rampid, id5, uid2, euid, pairid, maid)
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                minLength: 1
                maxLength: 64
              value:
                type: string
                minLength: 1
                maxLength: 512
            required:
              - type
              - value
        hashed_email:
          description: SHA-256 hash of lowercase, trimmed email address
          type: string
          pattern: ^[a-f0-9]{64}$
        hashed_phone:
          description: SHA-256 hash of E.164-formatted phone number
          type: string
          pattern: ^[a-f0-9]{64}$
        click_id:
          description: Platform click identifier (fbclid, gclid, ttclid, etc.)
          type: string
          maxLength: 512
        click_id_type:
          description: Type of click identifier
          type: string
          maxLength: 64
        client_ip:
          description: Client IP address for probabilistic matching
          type: string
          maxLength: 45
        client_user_agent:
          description: Client user agent string for probabilistic matching
          type: string
          maxLength: 512
    CustomData:
      description: Event-specific data (value, currency, items)
      type: object
      properties:
        value:
          description: Monetary value of the event
          type: number
        currency:
          description: ISO 4217 currency code (e.g. USD, EUR, GBP)
          type: string
          pattern: ^[A-Z]{3}$
        order_id:
          description: Unique order/transaction identifier
          type: string
          maxLength: 256
        content_ids:
          description: Product/content identifiers
          type: array
          items:
            type: string
            maxLength: 256
        content_type:
          description: Category (product, service, etc.)
          type: string
          maxLength: 128
        num_items:
          description: Count of items
          type: integer
          minimum: 0
          maximum: 9007199254740991
        contents:
          description: Per-item details (id, quantity, price, brand)
          type: array
          items:
            $ref: '#/components/schemas/ContentItem'
    ContentItem:
      description: Per-item detail within a conversion event
      type: object
      properties:
        id:
          type: string
          maxLength: 256
        quantity:
          type: integer
          maximum: 9007199254740991
          minimum: 1
        price:
          type: number
        brand:
          type: string
          maxLength: 256
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````