@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Interface LogEventRequest

    Request parameters for logging marketing events

    interface LogEventRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        event_source_id: string;
        test_event_code?: string;
        events: {
            event_id: string;
            event_type: EventType;
            event_time: string;
            user_match?: {
                uids?: [
                    { type: UIDType; value: string },
                    ...{ type: UIDType; value: string }[],
                ];
                hashed_email?: string;
                hashed_phone?: string;
                click_id?: string;
                click_id_type?: string;
                client_ip?: string;
                client_user_agent?: string;
                ext?: ExtensionObject;
            };
            custom_data?: EventCustomData;
            action_source?: ActionSource;
            surface?: EventSurface;
            event_source_url?: string;
            custom_event_name?: string;
            ext?: ExtensionObject;
        }[];
        idempotency_key: string;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    adcp_version?: string

    Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.

    adcp_major_version?: number

    DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.

    event_source_id: string

    Event source configured on the account via sync_event_sources

    test_event_code?: string

    Test event code for validation without affecting production data. Events with this code appear in the platform's test events UI.

    events: {
        event_id: string;
        event_type: EventType;
        event_time: string;
        user_match?: {
            uids?: [
                { type: UIDType; value: string },
                ...{ type: UIDType; value: string }[],
            ];
            hashed_email?: string;
            hashed_phone?: string;
            click_id?: string;
            click_id_type?: string;
            client_ip?: string;
            client_user_agent?: string;
            ext?: ExtensionObject;
        };
        custom_data?: EventCustomData;
        action_source?: ActionSource;
        surface?: EventSurface;
        event_source_url?: string;
        custom_event_name?: string;
        ext?: ExtensionObject;
    }[]

    Events to log

    Type Declaration

    • event_id: string

      Unique identifier for deduplication (scoped to event_type + event_source_id)

    • event_type: EventType
    • event_time: string

      ISO 8601 timestamp when the event occurred

    • Optionaluser_match?: {
          uids?: [
              { type: UIDType; value: string },
              ...{ type: UIDType; value: string }[],
          ];
          hashed_email?: string;
          hashed_phone?: string;
          click_id?: string;
          click_id_type?: string;
          client_ip?: string;
          client_user_agent?: string;
          ext?: ExtensionObject;
      }
      • Optionaluids?: [{ type: UIDType; value: string }, ...{ type: UIDType; value: string }[]]

        Universal ID values for user matching

        1

      • Optionalhashed_email?: string

        SHA-256 hash of lowercase, trimmed email address. Buyer must normalize before hashing: lowercase, trim whitespace. Pseudonymous PII, not anonymous — the email namespace is small enough that an unsalted SHA-256 is recoverable via precomputed dictionaries. Treat as PII for retention, consent, and access-control purposes. See docs/reference/privacy-considerations#unsalted-hashed-identifiers-are-pseudonymous-not-anonymous.

      • Optionalhashed_phone?: string

        SHA-256 hash of E.164-formatted phone number (e.g. +12065551234). Buyer must normalize to E.164 before hashing. Pseudonymous PII, not anonymous — the E.164 namespace is small enough that an unsalted SHA-256 is recoverable via precomputed dictionaries. Treat as PII for retention, consent, and access-control purposes. See docs/reference/privacy-considerations#unsalted-hashed-identifiers-are-pseudonymous-not-anonymous.

      • Optionalclick_id?: string

        Platform click identifier (fbclid, gclid, ttclid, ScCid, etc.)

      • Optionalclick_id_type?: string

        Type of click identifier (e.g. fbclid, gclid, ttclid, msclkid, ScCid)

      • Optionalclient_ip?: string

        Client IP address for probabilistic matching

      • Optionalclient_user_agent?: string

        Client user agent string for probabilistic matching

      • Optionalext?: ExtensionObject
    • Optionalcustom_data?: EventCustomData
    • Optionalaction_source?: ActionSource
    • Optionalsurface?: EventSurface
    • Optionalevent_source_url?: string

      URL where the event occurred (required when action_source is 'website')

    • Optionalcustom_event_name?: string

      Name for custom events (used when event_type is 'custom')

    • Optionalext?: ExtensionObject
    idempotency_key: string

    Client-generated unique key for this request. Prevents duplicate event logging on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.

    16

    255

    ^[A-Za-z0-9_.:-]{16,255}$

    context?: ContextObject