---
title: "Edit an email step"
method: PATCH
path: "/campaigns/{id}/steps/{step_index}"
tags: ["Campaigns"]
---

# Edit an email step

`PATCH /campaigns/{id}/steps/{step_index}`

## Request

- Base URL: `https://warmysender.com/api/v1`
- URL: `https://warmysender.com/api/v1/campaigns/{id}/steps/{step_index}`
- Auth: HTTP bearer

Changes the subject, preview text or body of one email step, in a campaign of any status including running. Only the fields you send change; the step's type, order and timing never do. Emails already sent cannot change: if anybody already received this step the call is refused with already_sent unless you send future_sends_only: true, and then the new text goes to everyone who has not received it yet. If the step has A/B versions, name one with variant. Same checks as creating a campaign (spintax, personalisation tags, body length). Nothing is sent by this call.

Required scope: `campaigns:write`.

## Path parameters

- `id` string, required
- `step_index` integer, required

## Request body

- object
  - `subject` string: New subject line. Supports spintax and personalisation tags.
  - `preheader` string: New preview text.
  - `body_html` string: New HTML body.
  - `body_text` string: New plain-text body.
  - `variant` string: A/B version to edit (e.g. "B"). Required only when the step has more than one version.
  - `future_sends_only` boolean: Confirms the edit should go to everyone who has not received this email yet, when some people already got it.

## Response `200`

Success

## Other responses

- `400`: `nothing_to_change` — None of subject, preheader, body_html or body_text was sent.; `not_email_step` — That step is not an email.; `variant_required` — The step has more than one A/B version and no variant was named.; `spintax_syntax_error` — A spintax group like {Hi|Hello} is not closed.; `template_invalid` — A personalisation tag is not written correctly.
- `401`: `unauthorized` — Missing or invalid API key.
- `403`: `insufficient_scope` — The API key lacks the scope this endpoint requires.
- `404`: `step_not_found` — The campaign has no step at that index.; `not_found` — Campaign not found.
- `409`: `already_sent` — Some people already received this email and future_sends_only was not true.
- `429`: `rate_limited` — Too many requests — slow down and retry after the Retry-After delay.

---

[API](https://skmtc.dev/warmysender/apis/warmysender-public-api.md) · [All operations](https://skmtc.dev/warmysender/apis/warmysender-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/warmysender/apis/warmysender-public-api/revisions/200f4d797d36?raw)
