# SetEmailTemplateVariantInput input


`SetEmailTemplateVariantInput` is a GraphQL input of the Chameleoon MAX API.

## 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.

### language

`String`

A language code from the locales catalogue. Null for the all-languages variant.

### subject

`String!` · required

The subject in Liquid, one line.

### htmlBody

`String`

The HTML body in Liquid. Only on an `HTML` template; on a `JSON` template it is refused with
`SYNTAX_MISMATCH`. If omitted, the variant keeps its own HTML, and a new variant copies the
HTML of the all-languages variant, else of the `sk` variant, else of the first variant.

### textBody

`String`

The plain-text body in Liquid. Only on an `HTML` template; on a `JSON` template it is refused
with `SYNTAX_MISMATCH`, because MAX renders the text from the design. If omitted together with
`htmlBody`, the variant keeps its own text. If omitted with a new `htmlBody`, or sent blank, the
text is derived from the HTML at render.

### design

[`JSON`](/chameleoon-max/type/json)

The block design ([`EmailTemplateVariant`](/chameleoon-max/type/email-template-variant) `design`). Only on a `JSON` template; on an
`HTML` template it is refused with `SYNTAX_MISMATCH`.

## Used by

- [`setEmailTemplateVariant`](/chameleoon-max/mutation/set-email-template-variant) (mutation)
