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

# openemail provider-imports

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

## Commands

### `openemail provider-imports inspect`

Look inside a Resend account before importing

```bash
openemail provider-imports inspect <api-key> [flags]
```

Reads the first page of every resource with a full-access Resend key and returns a count for each, with `more` set where a resource runs past its first page. Nothing is stored, and the key is not kept.

A sending-only key is 400 `restricted_key`: create a full-access key at Resend for the import and revoke it afterwards.

- Scopes: `settings:write`.
- Needs a sign-in.

**Arguments**

- `<api-key>` (required): A full-access Resend API key, `re_…`. Pass - to read it from standard input, or @path to read it from a file, so it stays out of your shell history.

**Examples**

```bash
openemail provider-imports inspect @resend-key.txt
```

Print the raw JSON

```bash
openemail provider-imports inspect @resend-key.txt --json
```

Also available in: API [`POST /provider-imports/inspect`](https://openemail.uk/docs/api/reference/imports#post-provider-imports-inspect); SDK [`providerImports.inspect()`](https://openemail.uk/docs/sdk/reference/provider-imports#inspect).

### `openemail provider-imports create`

Import from Resend

```bash
openemail provider-imports create --resend-key <value> --resources <a,b> [flags]
openemail provider-imports create --data <json|@file|-> [flags]
```

Queues an import from a Resend account. Suppressions keep their reason, segments become audiences, subscribed contacts arrive with their names, templates arrive as HTML templates with their variables declared, and webhooks are registered switched off because deliveries here are signed differently. Domains and API keys come back as a checklist in the report, since a signing key or a token cannot leave Resend.

The key is held encrypted only while the import runs and is erased when it ends, fails or is cancelled. Running it twice duplicates nothing.

- Scopes: `settings:write`.
- Needs a sign-in.
- Aliases: `new`, `add`.

**Flags**

- `--resend-key <value>`: A full-access Resend API key. Pass - to read it from standard input, or @path to read it from a file, so it stays out of your shell history. Required, here or in `--data`.
- `--resources <a,b>` (repeatable): Any of `suppressions`, `audiences`, `contacts`, `templates`, `webhooks`, `domains` and `api-keys`. Required, here or in `--data`.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

```bash
openemail provider-imports create --resend-key @resend-key.txt --resources suppressions,audiences,contacts,templates,webhooks,domains,api-keys
```

Read the whole body from a JSON file

```bash
openemail provider-imports create --data @provider-import.json
```

Also available in: API [`POST /provider-imports`](https://openemail.uk/docs/api/reference/imports#post-provider-imports); SDK [`providerImports.create()`](https://openemail.uk/docs/sdk/reference/provider-imports#create).

### `openemail provider-imports list`

List one page of imports from sending providers

```bash
openemail provider-imports list [flags]
```

One page of the provider imports in the workspace, newest first, each with its report.

Add `--all` to walk every page: a table on a terminal, one JSON object per line when piped or with `--ndjson`, and one `{ items, hasMore, nextCursor }` document with `--json`. `--max <n>` stops after that many items.

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

**Flags**

- `--limit <n>` (default `25`): Rows per page, a whole number from 1 to 100. The server defaults to 25.
- `--cursor <value>`: The `nextCursor` from the previous page. One that names no provider import in the workspace is a 400 `invalid_cursor`.
- `--all`: Fetch every page and stream the items as they arrive.
- `--max <n>`: Stop after this many items. Implies `--all`.
- `--ndjson`: Print every item as one JSON object per line. Implies `--all`

**Examples**

```bash
openemail provider-imports list
```

Walk every page and stop after 100 items

```bash
openemail provider-imports list --all --max 100
```

One JSON object per line when piped

```bash
openemail provider-imports list --all > provider-imports.ndjson
```

Also available in: API [`GET /provider-imports`](https://openemail.uk/docs/api/reference/imports#get-provider-imports); SDK [`providerImports.list()`](https://openemail.uk/docs/sdk/reference/provider-imports#list).

### `openemail provider-imports get`

Read one import from a sending provider

```bash
openemail provider-imports get <id> [flags]
```

Status, the step it is on and the report so far. Poll it while `status` is `queued` or `running`.

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

**Arguments**

- `<id>` (required): Provider import id, `pimp_` followed by 24 hex characters.

**Examples**

```bash
openemail provider-imports get pimp_3f9c2a7b1e4d8f60a5c7b92d
```

Print the raw JSON

```bash
openemail provider-imports get pimp_3f9c2a7b1e4d8f60a5c7b92d --json
```

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

### `openemail provider-imports cancel`

Cancel an import from a sending provider

```bash
openemail provider-imports cancel <id> [flags]
```

Stops the import and erases the Resend key. What already came across stays.

- Scopes: `settings:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<id>` (required): Provider import id, `pimp_` followed by 24 hex characters.

**Examples**

```bash
openemail provider-imports cancel pimp_3f9c2a7b1e4d8f60a5c7b92d
```

Skip the confirmation, for scripts

```bash
openemail provider-imports cancel pimp_3f9c2a7b1e4d8f60a5c7b92d --yes
```

Also available in: API [`POST /provider-imports/{id}/cancel`](https://openemail.uk/docs/api/reference/imports#post-provider-imports-id-cancel); SDK [`providerImports.cancel()`](https://openemail.uk/docs/sdk/reference/provider-imports#cancel).
