> ## 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 Ad

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

Fallback Microsoft Ads ad update tool for advanced or unsupported ad fields. Use dedicated operations first for common changes such as status. This calls REST UpdateAds with PUT /Ads, but sends a partial Ad object: the runner supplies AdGroupId, Ads\[0].Id, and Ads\[0].Type (from the required ad\_type), then merges only the fields in update\_payload. Use care with nested asset collections like Headlines or Descriptions because Microsoft replaces the entire submitted collection. Supports dry-run review.

|                       |                            |
| --------------------- | -------------------------- |
| **App**               | Microsoft Ads              |
| **Operation ID**      | `microsoft_ads_update_ad`  |
| **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 ad.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `ad_group_id`    | string or SelectItem                                                      | Yes      | -       | The ad group ID that contains the ad. Do not include this inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `ad_id`          | string or SelectItem                                                      | Yes      | -       | The Microsoft Ads ad ID to update. Do not include this inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `ad_type`        | string or SelectableOption                                                | Yes      | -       | The ad type (Type discriminator) of the ad being updated. Required because the UpdateAds endpoint needs it to validate the correct ad fields. Available values: Text, ExpandedText, ResponsiveSearch, ResponsiveAd, DynamicSearch, Product, Hotel, AppInstall. You can read it from the List Ads output (each ad's Type). Do not include this inside update\_payload.                                                                                                                                                                                                                         |
| `update_payload` | object or string                                                          | Yes      | -       | Partial Microsoft Ads Ad object as JSON. This uses the REST UpdateAds endpoint: the runner sends AdGroupId and Ads\[0].Id and Ads\[0].Type separately, then merges only the fields provided here. Do not include identity fields such as AdGroupId, Id, ad\_id, ad\_group\_id, ad\_type, Type, account, or connection\_id. Use care with nested asset collections such as Headlines or Descriptions because Microsoft replaces the entire submitted collection. Example payloads: \{"FinalUrls": \["`https://example.com`"]} or \{"Status": "Paused"} or \{"Path1": "shoes", "Path2": "sale"} |
| `dry_run`        | boolean                                                                   | No       | `False` | When true, return the resolved Microsoft Ads UpdateAds 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. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns ad\_group\_id, ad\_id, ad\_type, updated\_fields, final Microsoft Ads UpdateAds payload, dry\_run status, and any returned Microsoft response data.

**Fields**: `ad_group_id`, `ad_id`, `ad_type`, `updated_fields`, `payload`, `dry_run`, `response`
