# ads_associate_optimization_rules_to_campaign (https://sellersheetai.com/docs/mcp-api/tools/ads_associate_optimization_rules_to_campaign)

> Attach Sponsored Products bid optimization rules to a campaign — a rule changes nothing until it is associated.

Access: **DESTRUCTIVE** · toolset amazon_ads · family ads.sp

Amazon Ads API · AssociateOptimizationRulesToCampaign · POST /sp/campaigns/{campaignId}/optimizationRules Docs: https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod#tag/Optimization-Rules/operation/AssociateOptimizationRulesToCampaign Gate: approve — interactive: show the change (Amazon's preview first where one exists), wait for an explicit approve; autopilot: only when the seller's own words asked for this change; otherwise ask.

## Call it

MCP tool call:

```json
{
  "name": "ads_associate_optimization_rules_to_campaign",
  "arguments": {
    "store": "myStore-US",
    "countryCode": "<countryCode>",
    "campaignId": "<campaignId>",
    "body": {}
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/ads_associate_optimization_rules_to_campaign \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","countryCode":"<countryCode>","campaignId":"<campaignId>","body":{}}'
```

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `store` | string | yes | the store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim. |
| `countryCode` | string | yes | the Ads profile's 2-letter country code (e.g. 'US'). |
| `campaignId` | string | yes | the SP campaign the rules attach to. |
| `body` | object | yes | {optimizationRuleIds: ["amzn1.ads-rule.m.xxx"]}. |
| `apiVersion` | string |  | v1 (default) \| v2. |

## Result

- 207, one result per item; an item whose code is not "Ok" (or that is listed under error / failures) failed — read its details.
- `data.failed` — [{index, optimizationRuleId, code, details}] for every item Amazon did not confirm. ALWAYS relay this verbatim.

## Gotchas

- A campaign that already carries a rule from ads_create_optimization_rule (the campaign-optimization / rule-based-bidding API) REFUSES association: "Campaign has performance based rule enabled and therefore cannot associate an Intraday bidding rule or performance based rule." The two automation models are mutually exclusive per campaign — pick one and say which.
- Changes take up to 24 hours to take effect.