@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Interface CreateMediaBuyRequest

    Request parameters for creating a media buy. Supports two modes: (1) Manual mode - provide packages array with explicit line item configurations, or (2) Proposal mode - provide proposal_id and total_budget to execute a proposal from get_products. One of packages or proposal_id must be provided.

    interface CreateMediaBuyRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        idempotency_key: string;
        plan_id?: string;
        account: AccountReference;
        proposal_id?: string;
        total_budget?: { amount: number; currency: string };
        packages?: PackageRequest[];
        brand: BrandReference;
        advertiser_industry?: AdvertiserIndustry;
        invoice_recipient?: BusinessEntity;
        io_acceptance?: {
            io_id: string;
            accepted_at: string;
            signatory: string;
            signature_id?: string;
        };
        po_number?: string;
        agency_estimate_number?: string;
        start_time: string;
        end_time: string;
        paused?: boolean;
        push_notification_config?: PushNotificationConfig;
        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

    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.

    idempotency_key: string

    Client-generated unique key for this request. If a request with the same idempotency_key and account has already been processed, the seller returns the existing media buy rather than creating a duplicate. 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}$

    plan_id?: string

    Campaign governance plan identifier. Required when the account has governance_agents. The seller includes this in the committed check_governance request so the governance agent can validate against the correct plan.

    proposal_id?: string

    ID of a committed 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. If the referenced proposal has proposal_status: 'draft', the seller MUST reject with PROPOSAL_NOT_COMMITTED; the buyer finalizes first via get_products refine action 'finalize'.

    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

      0

    • 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.

    advertiser_industry?: AdvertiserIndustry
    invoice_recipient?: BusinessEntity
    io_acceptance?: {
        io_id: string;
        accepted_at: string;
        signatory: string;
        signature_id?: string;
    }

    Acceptance of an insertion order from a committed proposal. Required when the proposal's insertion_order has requires_signature: true. References the io_id from the proposal's insertion_order.

    Type Declaration

    • io_id: string

      The io_id from the proposal's insertion_order being accepted

    • accepted_at: string

      ISO 8601 timestamp when the IO was accepted

      date-time

    • signatory: string

      Who accepted the IO — agent identifier or human name

      1

      250

    • Optionalsignature_id?: string

      Reference to the electronic signature from the signing service, when signing_url was used

    po_number?: string

    Purchase order number for tracking

    agency_estimate_number?: string

    Agency estimate or authorization number. Primary financial reference for broadcast buys — links the order to the agency's media plan and billing system. Travels with the order and creative traffic identifiers through the transaction lifecycle.

    100

    start_time: string
    end_time: string

    Campaign end date/time in ISO 8601 format

    date-time

    paused?: boolean

    Create the media buy in a paused delivery state. When true, and the buy would otherwise be active because creatives are assigned and the flight has started, the seller returns media_buy_status 'paused'. Setup blockers still take precedence: a buy with no creatives remains 'pending_creatives', and a future-dated buy remains 'pending_start' until its flight can start. Defaults to false.

    push_notification_config?: PushNotificationConfig
    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.

      16

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

      Legacy authentication configuration for webhook delivery (A2A-compatible). Opts the receiver into Bearer or HMAC-SHA256 signing. Both schemes are deprecated; the preferred signing profile for new integrations is RFC 9421, where the seller signs with a key published at its brand.json agents[] entry and the buyer verifies against the seller's JWKS — no shared secret crosses the wire (see docs/building/implementation/security.mdx#webhook-callbacks). This field is required in AdCP 3.x; the requirement is removed in AdCP 4.0 when the default RFC 9421 path becomes the only path.

      • schemes: AuthenticationScheme[]

        Array of authentication schemes. ['Bearer'] for simple token auth, ['HMAC-SHA256'] for legacy shared-secret signing. Both are deprecated; new integrations SHOULD use the RFC 9421 webhook signing profile instead.

      • credentials: string

        Credentials for the legacy scheme. 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.

        32

    • 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

      0

      1

    context?: ContextObject
    ext?: ExtensionObject