# `bird email templates update`

## Usage

```bash
bird email templates update <template-ref> [flags]
```

## Description

Update an email template

Change a template's metadata and draft settings, such as its name or default language; only the fields sent change. Content is not edited here; a language is saved on the draft version. The request must include the draft `revision` last read; a concurrent change returns a conflict.

Build the request from flags, a JSON EmailTemplateUpdate body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Examples

```bash
# print the body shape (no credentials needed)
bird email templates update --example

# the body it prints:
```

```json
{
  "default_language": "pt-BR",
  "on_missing_language": "fallback",
  "revision": 3
}
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                         | Description                                                                                                                                                                                                 |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--revision <n>`             | The draft revision you last read (from the template's revision field). A stale value returns a conflict so you can reload and retry.                                                                        |
| `--name`                     | New display name. Free text; the slug is fixed at creation and cannot be changed, so whatever references the template keeps working across a rename.                                                        |
| `--description`              | New description of the template's purpose. Send null to clear it.                                                                                                                                           |
| `--default-language`         | New default language for the draft. Must be one of the languages the draft already carries, so add the language first if it is not there yet.                                                               |
| `--on-missing-language`      | How a send behaves when it asks for a language this template does not carry. Possible values: fallback, fail.                                                                                               |
| `--language-source-required` | Whether a send has to name a language. Turning it on rejects a send that names none instead of serving the default language, and makes the template unusable for a broadcast, which has no way to name one. |
| `--response-schema`          | Print the fields this command returns, then exit                                                                                                                                                            |

## Related

| Name                                                                              | Description                                           |
| --------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [`bird email templates create`](/docs/cli/reference/email-templates-create)       | Create an email template and its first editable draft |
| [`bird email templates delete`](/docs/cli/reference/email-templates-delete)       | Delete an email template                              |
| [`bird email templates duplicate`](/docs/cli/reference/email-templates-duplicate) | Duplicate an email template                           |
| [`bird email templates get`](/docs/cli/reference/email-templates-get)             | Get an email template                                 |
| [`bird email templates list`](/docs/cli/reference/email-templates-list)           | List email templates                                  |
| [`bird email templates preview`](/docs/cli/reference/email-templates-preview)     | Render a template with sample values                  |