---
title: "Update email automation"
method: PATCH
path: "/automations/email/{email_automation_id}"
tags: ["Automations"]
---

# Update email automation

`PATCH /automations/email/{email_automation_id}`

## Request

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

Partial update of an email automation: `automation_name`, `subject`, `body`, and/or `email_sent_per_day`. Supply only what changes. The recipient audience is not editable here. Requires `read_write` scope; `Idempotency-Key` optional; `X-Dry-Run: true` previews without writing.

## Path parameters

- `email_automation_id` integer, required

## Headers

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

## Request body

- EmailAutomationUpdateRequest: Body for PATCH /automations/email/{id}. All fields optional; supply only what changes. At least one must be present. Recipient audience (mailing_list / filters) is not editable here — recreate the automation to change who it targets.
  - `automation_name` string, nullable
  - `subject` string, nullable
  - `body` string, nullable: HTML or plaintext.
  - `email_sent_per_day` integer, nullable: Maximum emails per day this automation sends from its inbox.

## Response `200`

Successful Response

- AutomationWriteResponseV2
  - `data` AutomationResourceV2, required: Canonical write-endpoint response. Replaces the v1 AutomationResource (which mirrored the legacy single-shape body). Now reflects the four-type taxonomy — `automation_type` is the public-API type, not the DB string. The DB string is in `_internal_type` for debugging only.
    - `automation_id` integer, nullable: None on dry-run.
    - `shop_id` integer, required
    - `automation_name` string, required
    - `automation_type` union, required: One of: target_collab | dm | email | sample_request.
      - 'target_collab' | 'dm' | 'email' | 'sample_request'
      - string
    - `automation_status` string, required
    - `state` string, required
    - `config` AutomationStoredConfig
      - `sample_request_config` SampleRequestStoredConfig
        - `minimum_performance_criteria` SampleRequestStoredMinimumCriteria
          - `min_shop_gmv` number, nullable
      - `sample_approval` SampleRequestStoredConfig
        - `minimum_performance_criteria` SampleRequestStoredMinimumCriteria
          - `min_shop_gmv` number, nullable
    - `schedule` object, nullable
    - `creators_to_include` object, nullable
    - `creators_to_exclude` object, nullable
    - `crm_group_id` string, nullable
    - `ai_enabled` boolean
    - `end_date` string, nullable
    - `created_at` string, nullable
    - `updated_at` string, nullable
    - `metrics` EmailAutomationMetrics: Send outcomes for one email automation over a trailing window. Open tracking began in May 2026, so these cover the last `window_days` rather than all time — an all-time rate would be diluted by sends that could never register an open.
      - `window_days` integer, required: Length of the trailing window, in days.
      - `emails_sent` integer, required: Emails sent in the window; denominator for every rate below.
      - `open_count` integer, required: Emails opened at least once (tracking pixel).
      - `click_count` integer, required: Emails whose link was clicked, excluding security-gateway prefetches.
      - `reply_count` integer, required: Emails that received a reply.
      - `open_rate` number, nullable: Percent of sends opened; null when nothing was sent in the window.
      - `click_rate` number, nullable: Percent of SENDS whose link was clicked — not percent of opens. Reads 0 for an automation whose body carries no link. Null when nothing was sent in the window.
      - `reply_rate` number, nullable: Percent of sends replied to; null when nothing was sent in the window.
      - `gmv` number, nullable: Affiliate GMV from videos the emailed creators posted within 30 days of their last email from this automation, for this shop. Null unless requested — pass include_gmv=true on the list, or read the detail endpoint. Summed over distinct videos, so a creator matching several records cannot be counted twice.
      - `gmv_attributed_recipients` integer, nullable: Recipients whose address resolved to a creator, so their GMV could be counted.
      - `gmv_unresolved_recipients` integer, nullable: Recipients whose address matched no creator record, so no GMV could be attributed to them. Roughly a quarter of recipients platform-wide: addresses found on a creator's profile, or creators since removed. Read `gmv` as covering `gmv_attributed_recipients` of `gmv_attributed_recipients + gmv_unresolved_recipients`.
    - `created_via` string, nullable: Surface that created the automation. Always populated on response: rows with NULL or empty `created_via` (predating migration 020) are surfaced as `portal` since the portal was historically the only writer. Common values: portal | api | api_direct | mcp | agent | slack | internal | campaign_tc_auto (set is not closed — other internal surfaces may appear). `api_direct` marks single-creator invites created by `POST /public/v1/target-collabs`.
    - `side_effects` object, nullable: Backend side-effects, e.g. {'crm_group_created': '<uuid>'} on sample_request creates.
  - `dry_run` boolean
  - `side_effects` object, nullable: Backend side-effects, e.g. {'crm_group_created': 'uuid-...'} for sample_request creates.

## Other responses

- `400`: Validation, or missing/invalid Idempotency-Key.
- `403`: API key lacks `read_write` scope (`WRITE_NOT_PERMITTED`).
- `404`: Email automation not in this shop.
- `409`: Idempotency conflict.
- `422`: Validation Error
- `429`: Write-tier rate limit exceeded.

## Changes

> 76 revisions in range; 1 not diffed.

- **2026-10-31** `a905b640cf36`: 1 info
  - added the optional property `data/metrics` to the response with the `200` status
- **2026-09-19** `291230805105`: 1 breaking, 1 info
  - the `data/automation_type` response's property type changed from `string` to no type for status `200`
  - added `subschema #1, subschema #2` to the `data/automation_type` response property `anyOf` list for the response status `200`
- **2026-09-16** `30ad5ba59c8e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/reacherapp/apis/reacher-data-api/changes/automations/email/:email_automation_id/patch.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)
