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

    Interface SyncAccountsRequest

    Sync advertiser account state with a seller. Two modes, distinguished by the key on each per-account entry:

    • Provisioning mode (brand + operator + billing at the entry root): the agent declares which brands it represents, who operates on each brand's behalf, and the billing model. The seller provisions or links accounts via upsert. Used when brand + operator (+ sandbox) is the durable protocol key for buyer-declared accounts (require_operator_auth: false). Sellers MAY echo a seller-assigned account_id, but they MUST continue accepting the natural-key AccountRef for every account provisioned this way.

    • Settings-update mode (account field carrying an AccountRef): targets an existing account by account_id (or by natural key for buyer-declared accounts). The seller updates the account's settable state (notification subscriptions, payment terms, billing entity refinements) — no provisioning side effects. Used for account_id namespaces only when the seller exposes this task for account settings; the account_id itself is discovered via list_accounts for upstream-managed namespaces or supplied out-of-band for seller-defined namespaces. Buyer-declared account sellers MAY also accept this mode for settings updates against accounts they previously provisioned.

    Exactly one of the two key shapes is allowed per entry. Sellers that do not implement settings-update mode MUST return UNSUPPORTED_PROVISIONING on entries keyed by account.account_id; sellers that do not provision through sync_accounts MUST return UNSUPPORTED_PROVISIONING on entries keyed by the natural-key trio. Account-id namespace provisioning is out of scope unless a future explicit capability declares it.

    interface SyncAccountsRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        idempotency_key: string;
        accounts: (ProvisioningMode | SettingsUpdateMode)[];
        delete_missing?: boolean;
        dry_run?: boolean;
        push_notification_config?: PushNotificationConfig;
        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 at-most-once execution. Natural per-account upsert keys (brand, operator) handle resource-level dedup, but the envelope triggers onboarding webhooks, billing setup, and audit events — this key prevents those side effects from firing twice on retry. MUST be unique per (seller, request) pair. Use a fresh UUID v4 for each request.

    16

    255

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

    accounts: (ProvisioningMode | SettingsUpdateMode)[]

    Per-account sync entries. Each entry uses one of two key shapes: the account field (AccountRef) for settings-update mode, or the flat brand + operator + billing trio for provisioning mode.

    delete_missing?: boolean

    When true, accounts previously synced by this agent but not included in this request will be deactivated. Scoped to the authenticated agent — does not affect accounts managed by other agents. Use with caution.

    dry_run?: boolean

    When true, preview what would change without applying. Returns what would be created/updated/deactivated.

    push_notification_config?: PushNotificationConfig
    context?: ContextObject
    ext?: ExtensionObject