---
title: "Update an email"
method: PUT
path: "/v1/design_studio/emails/{id}"
tags: ["Design Studio"]
---

# Update an email

`PUT /v1/design_studio/emails/{id}`

Update part of an email: an email's name, template status, folder, content, envelope, or transformers. Note, this does not publish your email; if the email is linked to a workflow like an automation, you still need to click publish to make the changes live.

## Path parameters

- `id` string, uuid, required

## Request body

- EmailUpdate
  - `name` string — Display name of the email.
  - `is_template` boolean — Whether the email is a reusable template.
  - `parent_folder_id` string, uuid, nullable — The UUID of the parent folder. Omit if you want no change to where the folder or file is located. Include `null` to move it to your root directory. Or add the UUID of another folder to move it there.
  - `content` EmailContent — The content of your email.
    - `subject` string — Email subject line.
    - `preheader_text` string — Preview text.
    - `html` string — HTML body.
    - `amp` string — AMP HTML body.
    - `text` string — Plain text body.
  - `envelope` EmailEnvelopeInput — The envelope of your email, like from and to addresses.
    - `from_id` integer, nullable — Sender identity ID. Must reference an existing identity. You can find this in *Workspace Settings > Email* under your From Addresses.
    - `reply_to_id` integer, nullable — Reply-to identity ID. Must reference an existing identity from *Workspace Settings > Email* under your From Addresses.
    - `recipient` string — Recipient email address. Defaults to `{{customer.email}}`` if not set.
    - `bcc` string — BCC email address.
    - `fake_bcc` boolean — Whether to use fake BCC. Defaults to true if not provided.
    - `headers` EmailHeader[] — Custom headers. Each item: { "name": "string", "value": "string" }.
      - `name` string
      - `value` string
  - `transformers` Transformers — Automate repetitive actions like removing white space and inlining CSS with [transformers](/journeys/design-studio/emails/code-editor/overview/#transformers).
    - `url_parameters` object — Appends query string parameters to all absolute URLs in `<a>` and VML elements. Useful for adding UTM tracking or other analytics parameters. Skips `mailto:`, `tel:`, and `sms:` links. Elements marked with `data-ignore-params` are excluded.
      - `enabled` boolean — Enable URL parameter injection.
      - `parameters` object[] — List of parameters to append to URLs.
        - `key` string — Parameter name.
        - `value` string — Parameter value. May contain template variables.
        - `url_encode` boolean — URL-encode the value before appending it to the URL.
    - `css_variables` object — Resolves CSS custom properties (`var(--name)`) into their computed values. Required for email clients that do not support CSS custom properties (most email clients). Variables declared in one `<style>` tag are available in subsequent `<style>` tags.
      - `enabled` boolean — Enable CSS variable resolution.
      - `preserve` boolean — Keep original custom property declarations (`--name: value`) alongside the resolved values.
    - `css_inliner` object — Moves CSS from `<style>` tags into inline `style` attributes on each element. Essential for email clients with limited `<style>` support (for example, older Gmail and some Outlook versions). Uses the `juice` library. Elements in `<style>` tags marked with `data-ignore-inlining` are skipped.
      - `enabled` boolean — Enable CSS inlining.
      - `apply_style_tags` boolean — Inline styles from `<style>` tags.
      - `preserve_important` boolean — Preserve `!important` declarations in inlined styles.
      - `remove_style_tags` boolean — Remove `<style>` tags after inlining their rules.
      - `preserve_font_faces` boolean — Keep `@font-face` rules in `<style>` (cannot be inlined).
      - `preserve_media_queries` boolean — Keep `@media` rules in `<style>` (cannot be inlined).
      - `preserve_keyframes` boolean — Keep `@keyframes` rules in `<style>` (cannot be inlined).
      - `preserve_pseudos` boolean — Keep pseudo-selector rules (for example, `:hover`) in `<style>` (cannot be inlined).
      - `inline_pseudo_elements` boolean — Attempt to inline pseudo-element (`::before`, `::after`) styles.
      - `apply_html_attributes` object — Controls adding redundant HTML attributes alongside inlined CSS to different HTML elements.
        - `enabled` boolean — Enable adding redundant HTML attributes.
        - `apply_width_attributes` boolean — Add redundant HTML `width` attributes alongside inlined CSS `width` on `<table>`, `<td>`, `<th>`, and `<img>` elements. Only applies to `px` values (and `%` on table elements). Needed for email clients that ignore CSS width (for example, older Outlook).
        - `apply_height_attributes` boolean — Add redundant HTML `height` attributes alongside inlined CSS `height` on `<table>`, `<td>`, `<th>`, and `<img>` elements. Only applies to `px` values (and `%` on table elements). Needed for email clients that ignore CSS height.
        - `apply_table_element_attributes` boolean — Add redundant HTML attributes on table elements (`<table>`, `<th>`, `<tr>`, `<td>`, `<caption>`, `<colgroup>`, `<col>`, `<thead>`, `<tbody>`, `<tfoot>`): `background-color` → `bgcolor`, `background-image` → `background`, `text-align` → `align`, `vertical-align` → `valign`.
    - `accessibility` object — Applies a set of accessibility improvements to the email HTML. When no `language` is set, this falls back to the `lang` attribute on the `<html>` tag, or `"und"` (undetermined). The `dir` attribute is automatically derived from the language using RTL detection.
      - `enabled` boolean — Enable accessibility fixes.
      - `language` string — Language code (for example, `"en"`, `"fr"`, or `"ar"`) used for `lang` and `dir` attributes.
      - `add_lang_to_html` boolean — Add `lang` attribute to the `<html>` element if not already present.
      - `add_dir_to_html` boolean — Add `dir` attribute (`ltr`, `rtl`, or `auto`) to the `<html>` element if not already present.
      - `add_lang_to_content` boolean — Add `lang` attribute to direct children of `<body>`.
      - `add_dir_to_content` boolean — Add `dir` attribute to direct children of `<body>`.
      - `add_role_to_tables` boolean — Add `role="presentation"` to all `<table>` elements without an existing `role`, so screen readers skip table semantics for layout tables.
      - `add_vml_alt_text` boolean — Add `alt` attribute to VML elements (used by Outlook’s Word rendering engine), derived from the element’s text content.
      - `add_empty_alt_to_images` boolean — Add `alt=""` to `<img>` elements missing an `alt` attribute, preventing screen readers from reading the file name.
      - `add_title_to_head` boolean — Add a `<title>` tag to `<head>` using the email subject line (creates or replaces if empty).
      - `remove_button_role_from_links` boolean — Remove `role="button"` from `<a>` tags to restore proper link semantics for screen readers.
      - `remove_zoom_meta_tag` boolean — Remove viewport `<meta>` tags that restrict zoom (`user-scalable=0`, `user-scalable=no`, `maximum-scale=1`, or `maximum-scale=2`).
    - `formatter` object — Controls the output formatting of the final HTML. Only one mode (`prettify` or `minify`) can be active at a time. Set to `"none"` to skip formatting entirely.
      - `type` 'none' | 'prettify' | 'minify' — Formatting mode to apply.
      - `prettify` object — Options used when `type` is `"prettify"`. Produces human-readable, indented HTML output.
        - `indent_character` 'spaces' | 'tabs' — Character used for indentation.
        - `indent_size` integer — Number of indent characters per level.
        - `wrap_attributes` boolean — Wrap HTML attributes onto separate lines (`force-expand-multiline` mode).
      - `minify` object — Options used when `type` is `"minify"`. Reduces file size by stripping whitespace and comments.
        - `remove_line_breaks` boolean — Remove all line breaks from the output.
        - `line_length_limit` integer — Maximum characters per line before inserting a line break.
        - `remove_indentations` boolean — Remove leading whitespace indentation.
        - `remove_html_comments` '0' | '1' | '2' — HTML comment removal level. `"0"` keeps all comments, `"1"` removes non-conditional comments (preserves MSO conditionals like `<!--[if mso]>`), and `"2"` removes all comments including conditional.
        - `remove_css_comments` boolean — Remove CSS comments (`/* ... */`) from `<style>` blocks.
    - `prevent_widows` object — Replaces the last space in text blocks with a non-breaking space (`&nbsp;`) to prevent a single word from wrapping onto its own line (a “widow”). Only processes text nodes in the `<body>` and skips `<script>`, `<style>`, `<noscript>`, `<svg>`, and `<head>` elements. Preserves Liquid template tags (`{{ }} ` and `{% %}`).
      - `enabled` boolean — Enable widow word prevention.
    - `encode_entities` object — Encodes special characters (for example, `©`, `™`, and `—`) as their HTML entity equivalents. Improves rendering consistency across email clients with varying character encoding support. Only processes text nodes in the `<body>` and skips `<script>`, `<style>`, `<noscript>`, `<svg>`, and `<head>` elements. Preserves Liquid template tags and avoids double-encoding existing entities.
      - `enabled` boolean — Enable HTML entity encoding.
    - `remove_unused_css` object — Scans the HTML and removes any CSS selectors from `<style>` tags that are not referenced in the document. Reduces file size and helps avoid Gmail’s 102 KB clipping limit. HTML and CSS comments are always preserved by this step (comment removal is handled separately by the formatter object).
      - `enabled` boolean — Enable unused CSS removal.
      - `whitelist` string[] — CSS selectors to always keep, even if they are not found in the HTML. - .ReadMsgBody - .ExternalClass - .aBn - .a6S - .im - .yshortcuts - "#outlook" - .MsoHyperlink - .MsoHyperlinkFollowed
      - `backend_markers` object[] — Template syntax delimiters (e.g., Liquid, Handlebars) that the CSS parser should skip over to avoid treating template expressions as invalid CSS.
        - `heads` string — Opening delimiter.
        - `tails` string — Closing delimiter.
      - `uglify` boolean — Shorten (uglify) CSS class names to reduce file size.

## Response `204`

Email updated, no content returned

## Other responses

- `400` — Bad request. Possible reasons: - No fields provided - Invalid name - Unknown JSON field in content, envelope, or transformers - from_id or reply_to_id does not reference an existing identity - parent_folder_id is an empty string
- `401` — Unauthorized - missing or invalid API key
- `404` — Resource not found

---

[API](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference.md) · [All operations](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/customer/customer-io-journeys-api-reference/revisions/4b391af7cb06/schema)
