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

# Add Negative Keywords To Campaigns

> Add negative keywords (Exact or Phrase match) to Microsoft Ads campaigns

Add negative keywords (Exact or Phrase match) to Microsoft Ads campaigns. Returns successful IDs and per-row failures for partial writes; do not retry rows marked added.

| | |
| - | - |
| **App** | Microsoft Ads |
| **Operation ID** | `microsoft_ads_add_negative_keywords_to_campaigns` |
| **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 campaigns. |
| `update_type` | string or SelectableOption | Yes | - | Choose whether to add a negative keyword to a single campaign or to multiple campaigns at once. Options: 'single' or 'bulk'. |
| `campaign_id` | string or SelectItem | No | - | The campaign ID to add the negative keyword to. Required for single add. |
| `keyword` | string | No | - | The negative keyword text to add. Required for single add. |
| `match_type` | string or SelectableOption | No | - | Negative keyword match type. Options: Exact or Phrase (Microsoft negative keywords do not support Broad). Required for single add. |
| `structured_data` | array (also accepts a comma-separated string) | No | - | Structured data for bulk add. Required columns: 'campaign\_id', 'keyword', 'match\_type'. Required for bulk add. |

### 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 created\_count, failed\_count and per-keyword results with campaign\_id, negative\_keyword\_id, keyword, match\_type and action (added, failed or unknown). Bulk results include the original 1-based row\_number. Rejected rows include Microsoft's error; interrupted runs preserve completed results and include an error explaining the remaining rows.

**Fields**: `message`, `created_count`, `failed_count`, `results`, `error`


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