@adcp/client API Reference - v3.11.2
    Preparing search index...

    Interface CreateMediaBuyRequest

    Standard delivery and performance metrics available for reporting

    interface CreateMediaBuyRequest {
        buyer_ref: string;
        account_id?: string;
        proposal_id?: string;
        total_budget?: { amount: number; currency: string };
        packages?: PackageRequest[];
        brand_manifest: BrandManifestReference1;
        po_number?: string;
        start_time: string;
        end_time: string;
        reporting_webhook?: ReportingWebhook;
        artifact_webhook?: {
            url: string;
            token?: string;
            authentication: {
                schemes: [] | [AuthenticationScheme];
                credentials: string;
            };
            delivery_mode: "realtime"
            | "batched";
            batch_frequency?: "hourly" | "daily";
            sampling_rate?: number;
        };
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    buyer_ref: string

    Buyer's reference identifier for this media buy

    account_id?: string

    Account to bill for this media buy. Optional if the agent has a single account or the seller can determine the account from context (brand + agent). Required if the agent has multiple accounts and the seller cannot route automatically.

    proposal_id?: string

    ID of a proposal from get_products to execute. When provided with total_budget, the publisher converts the proposal's allocation percentages into packages automatically. Alternative to providing packages array.

    total_budget?: { amount: number; currency: string }

    Total budget for the media buy when executing a proposal. The publisher applies the proposal's allocation percentages to this amount to derive package budgets.

    Type Declaration

    • amount: number

      Total budget amount

    • currency: string

      ISO 4217 currency code

    packages?: PackageRequest[]

    Array of package configurations. Required when not using proposal_id. When executing a proposal, this can be omitted and packages will be derived from the proposal's allocations.

    brand_manifest: BrandManifestReference1
    po_number?: string

    Purchase order number for tracking

    start_time: string
    end_time: string

    Campaign end date/time in ISO 8601 format

    reporting_webhook?: ReportingWebhook
    artifact_webhook?: {
        url: string;
        token?: string;
        authentication: {
            schemes: [] | [AuthenticationScheme];
            credentials: string;
        };
        delivery_mode: "realtime"
        | "batched";
        batch_frequency?: "hourly" | "daily";
        sampling_rate?: number;
    }

    Optional webhook configuration for content artifact delivery. Used by governance agents to validate content adjacency. Seller pushes artifacts to this endpoint; orchestrator forwards to governance agent for validation.

    Type Declaration

    • url: string

      Webhook endpoint URL for artifact delivery

    • Optionaltoken?: string

      Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.

    • authentication: { schemes: [] | [AuthenticationScheme]; credentials: string }

      Authentication configuration for webhook delivery (A2A-compatible)

      • schemes: [] | [AuthenticationScheme]

        Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)

        1

      • credentials: string

        Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.

    • delivery_mode: "realtime" | "batched"

      How artifacts are delivered. 'realtime' pushes artifacts as impressions occur. 'batched' aggregates artifacts and pushes periodically (see batch_frequency).

    • Optionalbatch_frequency?: "hourly" | "daily"

      For batched delivery, how often to push artifacts. Required when delivery_mode is 'batched'.

    • Optionalsampling_rate?: number

      Fraction of impressions to include (0-1). 1.0 = all impressions, 0.1 = 10% sample. Default: 1.0

    context?: ContextObject
    ext?: ExtensionObject