> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Campaign

> Fallback Microsoft Ads campaign update tool for advanced or unsupported campaign fields

Fallback Microsoft Ads campaign update tool for advanced or unsupported campaign fields. Use dedicated operations first for common changes such as status or budget. This calls REST UpdateCampaigns with PUT /Campaigns, but sends a partial Campaign object: the runner supplies AccountId and Campaigns\[0].Id, then merges only the fields in update\_payload. Use care with nested objects like Settings or BiddingScheme because Microsoft may replace the submitted nested object or setting. Supports dry-run review.

|                       |                                 |
| --------------------- | ------------------------------- |
| **App**               | Microsoft Ads                   |
| **Operation ID**      | `microsoft_ads_update_campaign` |
| **Type**              | Action                          |
| **Connection**        | `microsoft_ads` (required)      |
| **Credits per run**   | 1                               |
| **Agent / MCP tool**  | Yes                             |
| **Requires approval** | Yes (write operation)           |

## Inputs

| Field            | Type                                                                      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------- | ------------------------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`        | object or array of object or MicrosoftAdsAccountItem or string or integer | Yes      | -       | Select the Microsoft Ads account that contains the campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `campaign_id`    | string or SelectItem                                                      | Yes      | -       | The Microsoft Ads campaign ID to update. Do not include this inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `update_payload` | object or string                                                          | Yes      | -       | Partial Microsoft Ads Campaign object as JSON. This uses the REST UpdateCampaigns endpoint: the runner sends AccountId and Campaigns\[0].Id separately, then merges only the fields provided here. Do not include identity fields such as AccountId, Id, campaign\_id, account, or connection\_id. Location targeting is not a Campaign field and does not belong in this payload; locations are updated through CampaignCriterions. Example payloads: \{"Languages": \["English", "Arabic"]} or \{"Settings": \[\{"Type": "AISearchSetting", "FinalUrlExpansionOptOut": true, "AutoGeneratedTextOptOut": true}]} |
| `dry_run`        | boolean                                                                   | No       | `False` | When true, return the resolved Microsoft Ads UpdateCampaigns payload without calling Microsoft Ads.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

### MicrosoftAdsAccountItem

| Field        | Type   | Required | Default | Description                                                                                                     |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `value`      | string | Yes      | -       |                                                                                                                 |
| `label`      | string | Yes      | -       |                                                                                                                 |
| `customerId` | string | No       | -       | The Microsoft Ads customer ID used for REST CustomerId headers. If omitted, it is resolved from the account ID. |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `Dict`

Returns campaign\_id, updated\_fields, final Microsoft Ads UpdateCampaigns payload, dry\_run status, and any returned Microsoft response data.

**Fields**: `campaign_id`, `updated_fields`, `payload`, `dry_run`, `response`
