Set Campaign UTMs
set_campaign_utmsSet or clear the UTM parameters for one channel of a wizard campaign, merging the supplied changes into the existing mapping. Returns the updated tracking settings or an error. Clearing a stored mapping restores inheritance from the account or platform defaults; it does not disable tracking. Account-level defaults remain unchanged. A saved mapping applies to incoming server-resolved leads immediately; publishing ad click URLs follows a separate timeline.
TRACKING TIMING AND TOKEN MEANING: Leads using server-resolved campaign UTMs use the current saved mapping when the platform processes them, without waiting for an ad republish. Captured URL or caller-supplied values can follow a different ingestion path, so do not generalize this timing to every new lead. Native click-time macros retain values captured from the lead's click URL. Ad click URLs have a separate publication timeline: a draft uses the saved mapping at launch, and launched ads use it on their next campaign publish. Saving a launched Microsoft Ads campaign triggers a live UTM push. AD_NAME is a dynamic token, not necessarily an individual ad name: standard experiments use their ad group name when present, otherwise their creative name; native ad structures use the native ad's own name. CAMPAIGN_NAME uses the wizard campaign name. Saving a launched campaign can also queue an asynchronous existing-lead UTM refresh. Do not assume historical rows are immutable or that all old rows have already refreshed. Verify the saved mapping with get_campaign_utms and actual lead values and ingestion timing separately from live ad click URLs; a supplied or backfilled lead creation date alone does not prove when its UTMs were resolved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| utms | Yes | UTM key to value, e.g. {"UTM_SOURCE": "Linkedin", "UTM_MEDIUM": "paid-social", "UTM_CAMPAIGN": "DG_Touch-3_TAG", "UTM_CONTENT": "AD_NAME"}. Empty string clears a key. | |
| channel | Yes | The enabled channel whose UTM mapping to edit. | |
| campaign_id | Yes | Wizard campaign id (the `id` from list_wizard_campaigns). |