# UpdateEmailTemplateInput input


The changes to a template's head. A field you omit keeps its value, and a field sent as null is
cleared: the default recipient or a default list. `name` and `resourceKind` cannot be cleared:
null on one is refused with `VALIDATION` naming it. A subject or body belongs to a variant (see
[`setEmailTemplateVariant`](/chameleoon-max/mutation/set-email-template-variant)).

## Input fields

### code

`String!` · required

The template's code.

### version

`Int!` · required

The version your change is based on. `CONFLICT` with reason `TEMPLATE_CHANGED` when somebody
saved first.

### name

`String`

The new display name, 1 to 120 characters.

### resourceKind

[`EmailTemplateResourceKind`](/chameleoon-max/type/email-template-resource-kind)

The new kind of record the template is written for.

### defaultTo

[`EmailTemplateRecipient`](/chameleoon-max/type/email-template-recipient)

Who a send goes to when it names no recipient.

### defaultCc

`[String!]`

The addresses every send copies in `cc`. Changing them requires the `email.read` permission.

### defaultBcc

`[String!]`

The addresses every send copies in `bcc`. Changing them requires the `email.read` permission.

### defaultAttachments

[`[EmailTemplateAttachment!]`](/chameleoon-max/type/email-template-attachment)

What a send attaches when it names no attachments.

## Used by

- [`updateEmailTemplate`](/chameleoon-max/mutation/update-email-template) (mutation)
