---
title: "Update a GMV Max automation"
method: PUT
path: "/gmv-max/automations/{automation_id}"
tags: ["GMV Max"]
---

# Update a GMV Max automation

`PUT /gmv-max/automations/{automation_id}`

## Request

- Base URL: `https://api.reacherapp.com/public/v1`
- URL: `https://api.reacherapp.com/public/v1/gmv-max/automations/{automation_id}`
- Auth: API key in header `x-api-key` and API key in header `x-shop-id`

Patch an existing automation. Only active, non-expired automations are editable — stopped, deleted, or past-end-date rows return 422 with ``AUTOMATION_NOT_EDITABLE`` or ``AUTOMATION_EXPIRED``.

PATCH semantics — fields the caller does NOT include are left unchanged. Sending ``null`` for ``boost_start_date`` / ``boost_end_date`` clears the boost window (both dates must be sent together).

``X-Dry-Run: true`` runs every check the update runs and echoes the patch without writing. Idempotent via the ``Idempotency-Key`` header. Single shop only.

## Path parameters

- `automation_id` integer, required

## Headers

- `Idempotency-Key` string, nullable
- `X-Dry-Run` string, nullable

## Request body

- AutomationUpdateRequestPublic: ``PUT /public/v1/gmv-max/automations/{id}`` — the portal's update body. PATCH semantics: only fields the caller sets are persisted (``model_dump(exclude_unset=True)`` in the route).
  - `name` string, nullable
  - `trigger_frequency` 'daily': How often the automation evaluates its conditions. Only ``daily`` runs.
  - `campaign_ids` string[], nullable
  - `conditions` ConditionRulePublic[], nullable
    - `metric` 'creative_roi' | 'creative_revenue' | 'campaign_roi' | 'campaign_revenue' | 'campaign_cost' | 'click_through_rate' | 'organic_engagement_rate' | 'product_ad_clicks' | '2s_video_view_rate' | 'impressions' | 'orders' | 'creative_orders' | 'boost_roas' | 'boost_revenue' | 'creative_ctr' | 'product_ad_click_rate' | 'creative_cost' | 'cost' | 'campaign_engagement_rate' | 'total_creative_boost_cost' | 'roi' | 'spend' | 'ctr' | 'spend_pacing', required: Metric a condition evaluates. The trailing four (``roi``, ``spend``, ``ctr``, ``spend_pacing``) are ``/templates`` vocabulary the boost engine cannot evaluate: a creative boost automation using one gets 422 ``UNENFORCEABLE_RULE``.
    - `operator` 'lt' | 'gte' | 'gt' | 'lte' | '>=' | '<=' | '>' | '<' | '==', required: Comparison operator. The boost engine evaluates the short form (``lt``, ``lte``, ``gt``, ``gte``) on every rule; the symbol form (``>=``, ``<``, ...) is ``/templates`` vocabulary and is refused with 422 ``UNENFORCEABLE_RULE``.
    - `value` number, required: Threshold the metric is compared against.
    - `lookback_days` integer: How many days of history the metric is computed over. Default 3.
  - `actions` ActionRulePublic[], nullable
    - `action_type` 'set_up_creative_boost', required: What the automation does. Only ``set_up_creative_boost`` runs.
    - `params` object: For `set_up_creative_boost`: `{"maxCapPerDay": <float>, "lookbackDays": <int|null>}`. `maxCapPerDay` is the daily budget of each boost. `lookbackDays` (1-365) checks the IF conditions over that many full days ending yesterday; null or omitted on create means the campaign's lifetime. On update, omitting it keeps the stored window and null clears it. STOP IF rules are not affected.
  - `guardrails` GuardrailRulePublic[], nullable
    - `rule_type` 'total_creative_boost_cost' | 'creative_roi' | 'creative_revenue' | 'campaign_roi' | 'campaign_revenue' | 'campaign_cost' | 'impressions' | 'orders' | 'boost_roas' | 'boost_revenue' | 'click_through_rate' | 'organic_engagement_rate' | 'product_ad_clicks' | '2s_video_view_rate' | 'creative_ctr' | 'product_ad_click_rate' | 'max_budget_daily' | 'cooldown_hours', required: What a guardrail stops on. ``total_creative_boost_cost`` (the lifetime cap) is required on every creative boost automation. ``creative_revenue``, ``max_budget_daily`` and ``cooldown_hours`` are not enforced by the boost engine and are refused with 422 ``UNENFORCEABLE_RULE``.
    - `operator` 'lt' | 'gte' | 'gt' | 'lte' | '>=' | '<=' | '>' | '<' | '==': Comparison operator. The boost engine evaluates the short form (``lt``, ``lte``, ``gt``, ``gte``) on every rule; the symbol form (``>=``, ``<``, ...) is ``/templates`` vocabulary and is refused with 422 ``UNENFORCEABLE_RULE``.
    - `value` number, required: Threshold value.
  - `boost_start_date` string, date, nullable
  - `boost_end_date` string, date, nullable

## Response `200`

Automation updated (or dry-run echo).

- AutomationResponse
  - `id` integer, required
  - `shop_id` integer, required
  - `name` string, required
  - `template_type` string, nullable
  - `status` string, required: Effective automation status: 'active', 'stopped', 'deleted', or the derived 'expired' — an 'active' boost whose boost_end_date has passed. Filter on 'expired' to exclude boosts that have ended.
  - `trigger_frequency` string, required
  - `campaign_ids` unknown[]
    - unknown
  - `conditions` unknown[]
    - unknown
  - `actions` unknown[]
    - unknown
  - `guardrails` unknown[]
    - unknown
  - `last_run_at` string, date-time, nullable
  - `next_run_at` string, date-time, nullable
  - `boost_start_date` string, date, nullable
  - `boost_end_date` string, date, nullable
  - `is_editable` boolean
  - `created_by` string, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `403`: API key lacks `read_write` scope.
- `404`: Automation not found in this shop.
- `409`: Idempotency-Key conflict.
- `422`: Validation error / automation not editable.
- `429`: Write rate limit exceeded.

## Changes

> 76 revisions in range; 1 not diffed.

- **2026-10-06** `8a05d3dfc50a`: 3 info
  - added the new `creative_orders` enum value to the request property `conditions/anyOf[subschema #1]/items/metric`
  - added the new `lte` enum value to the request property `conditions/anyOf[subschema #1]/items/operator`
  - added the new `lte` enum value to the request property `guardrails/anyOf[subschema #1]/items/operator/anyOf[subschema #1: ConditionOperator]/`
- **2026-10-04** `3530675d2c2a`: 1 breaking, 32 info
  - the response's body type changed from no type to `object` for status `200`
  - added the new `2s_video_view_rate` enum value to the request property `guardrails/anyOf[subschema #1]/items/rule_type`
  - added the new `campaign_engagement_rate` enum value to the request property `conditions/anyOf[subschema #1]/items/metric`
  - added the new `click_through_rate` enum value to the request property `guardrails/anyOf[subschema #1]/items/rule_type`
  - …29 more
- **2026-09-30** `67663b32ec24`: 8 info
  - added the new `boost_revenue` enum value to the request property `conditions/anyOf[subschema #1]/items/metric`
  - added the new `boost_revenue` enum value to the request property `guardrails/anyOf[subschema #1]/items/rule_type`
  - added the new `boost_roas` enum value to the request property `conditions/anyOf[subschema #1]/items/metric`
  - added the new `boost_roas` enum value to the request property `guardrails/anyOf[subschema #1]/items/rule_type`
  - …4 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/reacherapp/apis/reacher-data-api/changes/gmv-max/automations/:automation_id/put.md)

---

[API](https://skmtc.dev/reacherapp/apis/reacher-data-api.md) - [All operations](https://skmtc.dev/reacherapp/apis/reacher-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reacherapp/apis/reacher-data-api/revisions/63ce74b30b5a?raw)
