# `bird email domains update`

## Usage

```bash
bird email domains update <domain-id> [flags]
```

## Description

Update a sending domain's tracking settings and tracking domain.

--click-tracking and --open-tracking apply immediately to new sends; enabling
either with no tracking domain configured returns 409. --tracking-domain sets or
changes the tracking name part — on a verified domain the change is staged behind
DNS verification. Removing the tracking domain is not yet supported here.

Build the request from flags, a JSON DomainUpdate 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 domains update --example

# the body it prints:
```

```json
{
  "settings": {
    "click_tracking": true,
    "open_tracking": true
  },
  "tracking": {
    "name": "links"
  }
}
```

```bash
# enable click and open tracking
bird email domains update dom_123 --click-tracking --open-tracking

# set the tracking domain name part
bird email domains update dom_123 --tracking-domain links

# disable open tracking
bird email domains update dom_123 --open-tracking=false
```

## Options

#### Tracking

| Name                | Description                                              |
| ------------------- | -------------------------------------------------------- |
| `--click-tracking`  | Rewrite links to record clicks (needs a tracking domain) |
| `--open-tracking`   | Insert a pixel to record opens (needs a tracking domain) |
| `--tracking-domain` | Name part for branded tracking URLs (e.g. "links")       |

#### 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                                      |
| ------------------- | ------------------------------------------------ |
| `--response-schema` | Print the fields this command returns, then exit |

## Related

| Name                                                                    | Description                                                        |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [`bird email domains create`](/docs/cli/reference/email-domains-create) | Register a sending domain and return the DNS records to configure. |
| [`bird email domains delete`](/docs/cli/reference/email-domains-delete) | Delete a sending domain                                            |
| [`bird email domains get`](/docs/cli/reference/email-domains-get)       | Get a sending domain                                               |
| [`bird email domains list`](/docs/cli/reference/email-domains-list)     | List sending domains                                               |
| [`bird email domains verify`](/docs/cli/reference/email-domains-verify) | Trigger domain verification                                        |