---
title: "openemail dns-connections"
description: "Every command in this namespace, with its arguments, flags and examples."
url: "https://openemail.uk/docs/cli/reference/dns-connections"
area: "CLI"
category: "Reference"
---

# openemail dns-connections

Every command in this namespace, with its arguments, flags and examples.

## Commands

### `openemail dns-connections list`

List the DNS provider accounts connected to the workspace

```bash
openemail dns-connections list [flags]
```

Returns every DNS provider account connected to the workspace, through which OpenEmail writes the records of a domain itself, as the Providers tab of the domains page in the app shows them. Each one names the domains it serves, how many records OpenEmail wrote through it and still keeps, and whether it is `active`, needs connecting again (`needs-reauth`) or was disconnected (`revoked`).

`configured` is false when this server cannot connect a provider at all. A connection is made in the app, because the provider asks the person to sign in, so there is no method to create one.

- Scopes: `domains:read`.
- Needs a sign-in.
- Aliases: `ls`.

**Examples**

```bash
openemail dns-connections list
```

Print the raw JSON

```bash
openemail dns-connections list --json
```

Also available in: API [`GET /dns-connections`](https://openemail.uk/docs/api/reference/domains#get-dns-connections); SDK [`dnsConnections.list()`](https://openemail.uk/docs/sdk/reference/dns-connections#list).

### `openemail dns-connections get`

Read a DNS connection and what disconnecting it would leave behind

```bash
openemail dns-connections get <id> [flags]
```

Returns one connection with what disconnecting it would do: the domains it serves, the records OpenEmail wrote through it, `busy` for the domains a sync is running on right now, which hold a disconnect back until it ends, and `keepsMail` for the verified domains that stop receiving mail once their records come down.

- Scopes: `domains:read`.
- Needs a sign-in.
- Aliases: `show`, `view`.

**Arguments**

- `<id>` (required): A connection id from `list`.

**Examples**

```bash
openemail dns-connections get dnsl_3f9a1c2e7b4d4e6f8a0b2c3d
```

Print the raw JSON

```bash
openemail dns-connections get dnsl_3f9a1c2e7b4d4e6f8a0b2c3d --json
```

Also available in: API [`GET /dns-connections/{id}`](https://openemail.uk/docs/api/reference/domains#get-dns-connections-id); SDK [`dnsConnections.get()`](https://openemail.uk/docs/sdk/reference/dns-connections#get).

### `openemail dns-connections delete`

Disconnect a DNS provider account

```bash
openemail dns-connections delete <id> [flags]
```

Disconnects the account as Disconnect does in the app: the records OpenEmail wrote through it come down, every domain it serves is detached, and the connection is revoked at the provider. A verified domain whose records come down stops receiving mail, so read `get` first. `detached` counts what came down and lists the records still published, to delete by hand.

A connection that is already disconnected is removed from the list instead, once no domain and no record is left on it, and `removed` says so.

- Scopes: `domains:write`.
- Needs a sign-in.
- Asks you to confirm.
- Aliases: `rm`, `del`, `remove`.

**Arguments**

- `<id>` (required): A connection id from `list`.

**Examples**

```bash
openemail dns-connections delete dnsl_3f9a1c2e7b4d4e6f8a0b2c3d
```

Skip the confirmation, for scripts

```bash
openemail dns-connections delete dnsl_3f9a1c2e7b4d4e6f8a0b2c3d --yes
```

Also available in: API [`DELETE /dns-connections/{id}`](https://openemail.uk/docs/api/reference/domains#delete-dns-connections-id); SDK [`dnsConnections.delete()`](https://openemail.uk/docs/sdk/reference/dns-connections#delete).
