# `bird email inbox-insights domain-monitoring upsert`

## Usage

```bash
bird email inbox-insights domain-monitoring upsert [flags]
```

## Description

Set up monitoring for the workspace's main verified sending domain. Takes no body.
Existing monitoring returns already\_on without changes. Otherwise, the sole verified
domain or the domain that sent the most mail in the last 30 days is enabled; an uncertain choice returns
choice\_required, and no verified domains returns no\_verified\_domains. Only enabled has a
non-null domain. Read the domain list after already\_on; ask the user to choose after
choice\_required. Reuse an idempotency key for retries of the same setup attempt.

API-key and service-account calls require Insights preview access for your organization.

## Examples

```bash
bird email inbox-insights domain-monitoring upsert
```

## Options

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |
| `--response-schema` | Print the fields this command returns, then exit             |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
