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

> Update a Sponsored Products bid optimization rule — Amazon replaces the rule, it does not merge, so send the FULL rule object(s) including optimizationRuleId.

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

Read the current rule first with ads_search_optimization_rules. Amazon Ads API · UpdateOptimizationRules · PUT /sp/rules/optimization Docs: https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod#tag/Optimization-Rules/operation/UpdateOptimizationRules 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_sp_update_optimization_rules",
  "arguments": {
    "store": "myStore-US",
    "countryCode": "<countryCode>",
    "body": "<body>"
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/ads_sp_update_optimization_rules \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","countryCode":"<countryCode>","body":"<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'). |
| `body` | object[] \| object | yes | the FULL rule object(s) including optimizationRuleId — v1 1–25 rules per call, v2 1–300. |
| `apiVersion` | string |  | v1 (default) \| v2 — must match the rule's own kind. |

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

## Body (Amazon schema; application/vnd.spoptimizationrules.v1+json): {optimizationRules

- [OptimizationRulesAPISwaggerOptimizationRule]} (1–25), each item: action*: {actionDetails*: {actionOperator*, actionUnit*, value*}, actionType*: ADOPT} action.actionDetails.actionOperator: INCREMENT action.actionDetails.actionUnit: PERCENT conditions: [{attributeName: ROAS, criteria: {maxValue*, minValue*} | {comparisonOperator*, value*}}] (max 1) conditions.criteria.comparisonOperator: EQUAL_TO | GREATER_THAN | GREATER_THAN_OR_EQUAL_TO | LESS_THAN | LESS_THAN_OR_EQUAL_TO recurrence*: {daysOfWeek, duration*: {endTime, eventId, eventName, startTime}, timesOfDay: [{endTime*, startTime*}] (max 1), type*: DAILY | WEEKLY} recurrence.daysOfWeek: [FRIDAY | MONDAY | SATURDAY | SUNDAY | THURSDAY | TUESDAY | WEDNESDAY] ruleCategory*: BID ruleName: string ruleSubCategory*: SCHEDULE status: ENABLED | ENDED | PAUSED | SCHEDULED optimizationRuleId: string

## Gotchas

- To stop a rule, send status: PAUSED yourself — it is the only status Amazon honours as an off-switch. ARCHIVED and ENDED are refused before the call reaches Amazon (Amazon itself 400s ARCHIVED and silently reverts ENDED to SCHEDULED).
- A rule read back from ads_search_optimization_rules may carry a `recurrence` (on a TARGETING rule, which rejects it on write) or an empty v2 `targeting: []` (which 400s as "size must be between 1 and 1") — both are stripped automatically before the write, so a naive list -> edit -> update round trip does not fail.
- Changes take up to 24 hours to take effect; rules stack additively.