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

# Manage Ad Group Criteria

> Add, update or remove Microsoft Ads ad-group criteria using native payloads, including audience/custom-segment associations and targeting

Add, update or remove Microsoft Ads ad-group criteria using native payloads, including audience/custom-segment associations and targeting. Use dedicated product-partition operations for Shopping trees. Changing schedule days/hours requires explicit remove and add calls; no automatic rebuild is performed.

| | |
| - | - |
| **App** | Microsoft Ads |
| **Operation ID** | `microsoft_ads_manage_ad_group_criteria` |
| **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. |
| `action` | enum (`add`, `update`, `remove`) | Yes | - | Add new ad group criteria, update existing criteria, or remove specified criterion IDs. |
| `criteria_payload` | object or string | Yes | - | Native Microsoft request body as an object or JSON string; nested fields are forwarded unchanged. Use CriterionType=Audience for audience associations, Targets for location/demographic/schedule criteria, or the appropriate native type. Up to 1,000 criteria per request. Add a custom segment: \{"CriterionType":"Audience","AdGroupCriterions":\[\{"Type":"BiddableAdGroupCriterion","AdGroupId":123,"Status":"Paused","Criterion":\{"Type":"AudienceCriterion","AudienceId":456},"CriterionBid":\{"Type":"BidMultiplier","Multiplier":0}}]}. Update: same shape with the association Id and only fields to change, e.g. Status="Active". Remove: \{"AdGroupId":123,"AdGroupCriterionIds":\[789],"CriterionType":"Audience"}. Custom segments support biddable ad-group associations. Use update\_ad\_group Settings to configure TargetAndBid; adding an association does not change targeting mode. For product partitions always use microsoft\_ads\_update\_product\_partitions instead. Microsoft validates nested fields. |

### 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 native Microsoft mutation response, including created criterion IDs, NestedPartialErrors for add/update, and PartialErrors for removal. Inspect errors for individual failed rows; partial successes remain visible.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.