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

> Update an existing Microsoft Ads ad extension of any type, for example changing the phone number on a call extension or the text on a sitelink

Update an existing Microsoft Ads ad extension of any type, for example changing the phone number on a call extension or the text on a sitelink. No dedicated update operation exists for any extension type, so this is the way to edit one. It takes a raw Microsoft ad extension object carrying the Id and Type of the extension to change. Microsoft requires the Type on every update and treats some fields as required even when unchanged, such as CountryCode and PhoneNumber on a call extension, so send the full set for that type. The object is sent unchanged, so a rejection is Microsoft validating the payload.

|                       |                                     |
| --------------------- | ----------------------------------- |
| **App**               | Microsoft Ads                       |
| **Operation ID**      | `microsoft_ads_update_ad_extension` |
| **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 owns the ad extension.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `extension` | object or string                                                          | Yes      | -       | The ad extension object, as JSON, exactly as the Microsoft Advertising Campaign Management API version 13 defines it, sent unchanged to its UpdateAdExtensions operation. Carry the Id of the extension to change and its Type, plus the fields being changed. For example \{"Type": "CallAdExtension", "Id": 9964344458744, "CountryCode": "GB", "PhoneNumber": "01420 561661"}. Microsoft requires the Type on every update, and treats some fields as required even when unchanged, such as CountryCode and PhoneNumber on a call extension, so send the full set for that type. The Type value is also the name of Microsoft's data object, so searching their Campaign Management reference for that name shows which fields an update needs. Valid types: ActionAdExtension, AppAdExtension, CallAdExtension, CalloutAdExtension, FilterLinkAdExtension, FlyerAdExtension, ImageAdExtension, LocationAdExtension, LogoAdExtension, PriceAdExtension, PromotionAdExtension, ReviewAdExtension, SitelinkAdExtension, StructuredSnippetAdExtension. |

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

## Output

**Type**: `Dict`

Returns the extension that was updated and which fields were sent.

**Fields**: `ad_extension_id`, `type`, `updated_fields`
