> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# savedEmailTemplateUpdate

> Rename a saved, forwarded or uploaded email template in the store's email library. Returns null if no listed saved template matches the id. Errors: BAD_USER_INPUT for a blank `name`; SAVED_EMAIL_TEMPLATE_GENERATING (409) while the saved template is still being built.

**Required scopes:** [`marketing_templates_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_write)

**Store must have one of:** `EMAIL_SMS`, `HSA`, `ORDER_TRACKING`, `RETURNS`, `TNPL`, `REVIEWS`

## Arguments

**id** `ID!` *required*

The saved template's `id`.

**input** `[SavedEmailTemplateUpdateInput!](/docs/api-reference/v3/reference/marketing/saved-email-template-update-input)` *required*

The fields to change.

**fields**

**name** `String!` *required*

The merchant-facing name of the saved template.

## Returns

**savedEmailTemplateUpdate** `[SavedEmailTemplate](/docs/api-reference/v3/reference/marketing/saved-email-template)`

A saved, forwarded or uploaded email the store keeps in its email library as a starting point for new emails.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the saved template was created.

**generating** `Boolean!` *required*

True while Redo is still building it from a forwarded email; it cannot be used until this is false.

**id** `ID!` *required*

The id of this saved template.

**lastUsedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When it was created, last opened from the library, or last copied, whichever is latest.

**name** `String!` *required*

The merchant-facing name of the saved template.

**preview** `[EmailTemplatePreview](/docs/api-reference/v3/reference/marketing/email-template-preview)`

Render this saved template, to see what recipients get. Use a width of about 375 for a phone. Null while the saved template is still being built.

**Requires:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

**fields**

**Arguments**

**eventId** `ID`

Render with this recent event's data instead of sample data: a 24-character hex event id. A well-formed id that can't be found falls back to sample data.

**width** `Int`

Viewport width of the screenshot, 320-1200 pixels.

**Fields**

**height** `Int`

The screenshot's full height in pixels.

**html** `String!` *required*

The rendered email HTML, as a recipient's client would receive it.

**imageUrl** `String`

A link to a full-length PNG screenshot at the requested width. It expires after an hour.

**sizeBytes** `Int!` *required*

The size of `html` in bytes (UTF-8), counted the way the Redo email builder counts it.

**sizeLimitBytes** `Int!` *required*

The size above which Redo flags an email: 90% of the 102 KB at which Gmail clips a message. The email builder shows a larger email in red.

**width** `Int`

The screenshot's width in pixels.

**previewText** `String`

The preview text shown after the subject in an inbox. Null when unset.

**source** `[SavedEmailTemplateSource!](/docs/api-reference/v3/reference/marketing/saved-email-template-source)` *required*

How the template was added.

**subject** `String!` *required*

The subject line as authored. Empty when the template has none.

**trigger** `[MarketingTrigger!](/docs/api-reference/v3/reference/marketing/marketing-trigger)` *required*

The trigger context the email was written for. Forwarded templates are not tied to a trigger, so they report UNKNOWN. UNKNOWN also covers stored triggers this API version does not model.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the saved template was last edited, opened or copied.

## Example

```graphql theme={null}
mutation {
  savedEmailTemplateUpdate(id: "...", input: { ... }) {
    createdAt
    generating
    id
    lastUsedAt
    name
    previewText
    source
    subject
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.