> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emailx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Command reference

> Every v1 operation, organized by the job you need to do.

Example IDs are placeholders. Use IDs returned for your selected workspace, and keep the channel alongside campaign and conversation IDs. Inspect any command with `--help`.

## Read

```bash theme={null}
emailx auth status --json
emailx workspaces list --limit 25 --json
emailx workspaces get 123 --json
emailx contacts list --workspace 123 --email person@example.com --json
emailx contacts get 789 --workspace 123 --json
emailx campaigns list --workspace 123 --channel linkedin --json
emailx campaigns get 456 --workspace 123 --channel linkedin --json
emailx campaigns configuration 456 --workspace 123 --channel linkedin --json
emailx prospects list 456 --workspace 123 --channel linkedin --json
emailx inbox list --workspace 123 --channel email --json
emailx inbox get 789 --workspace 123 --channel email --json
emailx senders list --workspace 123 --channel email --json
emailx senders get 903 --workspace 123 --channel email --json
emailx workspaces capabilities 123 --json
emailx members list --workspace 123 --json
emailx reply-routing options --workspace 123 --channel linkedin --json
emailx analytics get --workspace 123 --channel linkedin --json
emailx outcomes list --workspace 123 --channel email --json
```

Lists return one page. Pass `--cursor` with `next_cursor` and unchanged filters to continue. Contact lists also accept `--unsubscribed true` or `false`. Sender data is stored metadata, inbox history is incomplete and analytics are all-time. Outcomes may return `feature_unavailable`.

## Create or update

```bash theme={null}
emailx contacts create --workspace 123 --file contact.json --idempotency-key contact-001 --json
emailx contacts update 789 --workspace 123 --file changes.json --idempotency-key contact-update-001 --json
emailx contacts suppress 789 --workspace 123 --idempotency-key suppress-001 --json
emailx campaigns create-draft --workspace 123 --channel linkedin --file draft.json --idempotency-key draft-001 --json
emailx campaigns configure 456 --workspace 123 --channel linkedin --file setup.json --idempotency-key setup-001 --json
emailx campaigns rename 456 --workspace 123 --channel linkedin --name "Reviewed draft" --idempotency-key rename-001 --json
emailx prospects add 456 --workspace 123 --channel linkedin --file prospect.json --idempotency-key prospect-001 --json
emailx prospects add 456 --workspace 123 --channel email --file audience.json --idempotency-key audience-001 --json
```

Contact create requires `email`; update cannot change it. Suppression sets `unsubscribed=true` and cannot undo an opt-out. A LinkedIn prospect file needs a resolved `provider_id`; an email audience file uses `{"contact_ids":[789]}`. Both attach only to inactive drafts and perform no provider lookup or send.

## Pause

```bash theme={null}
emailx campaigns get 456 --workspace 123 --channel linkedin --json
emailx campaigns pause 456 --workspace 123 --channel linkedin --idempotency-key pause-001 --yes --json
emailx campaigns get 456 --workspace 123 --channel linkedin --json
```

Pause requires explicit intent. An interactive shell prompts; noninteractive scripts must supply `--yes` or fail before HTTP. It cannot recall in-flight activity. Pausing a draft leaves it a draft. No resume command exists.

## Templates and LinkedIn imports

Package 0.5.0 adds commands for saved template settings and bounded LinkedIn profile URL imports. Template reads require `templates:read`; template creation and updates require `templates:write`. Saving template fields does not run prompts or approve generated content.

```bash theme={null}
emailx templates list --workspace 123 --json
emailx templates get 601 --workspace 123 --json
emailx templates create --workspace 123 --file template.json --idempotency-key template-001 --json
emailx templates update 601 --workspace 123 --file template-update.json --idempotency-key template-update-001 --json
```

For LinkedIn, first read the latest campaign configuration and copy its `revision` into `import.json`. Include the selected Emailx sender ID and 1 to 100 canonical HTTPS profile URLs. Configuration reads require `campaigns:read`; the import requires `campaigns:import`. The execution feature is disabled by default, and lookups can consume provider quota. The import itself does not activate or send.

```bash theme={null}
emailx campaigns import-linkedin 456 --workspace 123 --file import.json --idempotency-key linkedin-import-001 --json
emailx operations list --workspace 123 --json
emailx operations get op_0123456789abcdef0123456789abcdef --workspace 123 --json
emailx operations rows op_0123456789abcdef0123456789abcdef --workspace 123 --json
emailx operations cancel op_0123456789abcdef0123456789abcdef --workspace 123 --idempotency-key cancel-001 --yes --json
```

Operation reads require `operations:read` and `campaigns:read`. Cancellation also requires `operations:write` and the original command grant: `campaigns:import` for an import or `campaigns:launch` for an activation. `--yes` makes the intent explicit in scripts. If a response is uncertain, inspect the operation and import row results when available. The CLI does not retry commands automatically. See [templates and LinkedIn imports](https://docs.emailx.ai/en/overview/templates-and-linkedin-imports.md) for JSON input shape and recovery rules.

## Review and activate a LinkedIn campaign

Package 0.6.0 adds People eligibility preview and explicit activation for reviewed manual LinkedIn drafts. The People preview is read-only and does not enroll contacts. Review and launch writes require `campaigns:launch` and a ready unexpired review. Reading configuration and campaign progress requires `campaigns:read`; operation polling requires `operations:read` and `campaigns:read`. Check workspace capabilities; handle `feature_unavailable` as not enabled.

```bash theme={null}
emailx contacts select --workspace 123 --file selection.json --idempotency-key people-preview-001 --json
emailx campaigns configuration 456 --workspace 123 --channel linkedin --json
emailx campaigns review-linkedin 456 --workspace 123 --expected-revision CURRENT_REVISION --idempotency-key linkedin-review-001 --json
emailx campaigns launch-linkedin 456 --workspace 123 --review-id REVIEW_ID --idempotency-key linkedin-launch-001 --yes --json
emailx operations get op_0123456789abcdef0123456789abcdef --workspace 123 --json
emailx campaigns linkedin-progress 456 --workspace 123 --json
emailx prospects get-linkedin 901 --workspace 123 --campaign 456 --json
emailx campaigns pause 456 --workspace 123 --channel linkedin --idempotency-key pause-002 --yes --json
emailx campaigns review-linkedin-resume 456 --workspace 123 --expected-revision CURRENT_REVISION --idempotency-key linkedin-resume-review-001 --json
emailx campaigns resume-linkedin 456 --workspace 123 --review-id RESUME_REVIEW_ID --idempotency-key linkedin-resume-001 --yes --json
```

Package 0.9.0 adds `review-linkedin-resume` and `resume-linkedin` for paused, previously launched manual campaigns. Resume needs its own review: a launch review is rejected. It keeps saved progress, runs no launch batch and never retries uncertain attempts. Scripts require `--yes`.

Use the latest configuration revision for the review. The command prompts before launch in an interactive shell; scripts require `--yes`. A successful operation receipt means local activation for the ordinary scheduled dispatcher, not delivery. If the launch outcome is uncertain, read the original operation and do not resubmit automatically. For stale or expired reviews, reconcile current state and request a fresh review. See [review and launch](https://docs.emailx.ai/en/overview/review-and-launch-linkedin.md) for the complete workflow.

[Draft preparation](https://docs.emailx.ai/en/cli/drafts.md) covers input and dry-run behavior. [Scripting](https://docs.emailx.ai/en/cli/scripting.md) covers output and exit codes.

## Email execution and People import

Package 0.8.0 adds separate preparation, generation, exact-message review, approval, and reviewed email launch commands, plus bounded CSV/XLSX People import. Use a matching API host and verify workspace capabilities. `campaigns:generate`, `messages:write`, `messages:approve`, and `campaigns:launch-email` are separate scopes. `campaigns:launch-email` is for email; LinkedIn activation still uses `campaigns:launch`.

```bash theme={null}
emailx campaigns prepare-email 456 --workspace 123 --expected-revision REVISION --idempotency-key prepare-001 --json
emailx campaigns generate-email 456 --workspace 123 --expected-revision REVISION --task-id 101 --confirm-credit-use --idempotency-key generate-001 --yes --json
emailx messages list 456 --workspace 123 --json
emailx messages get 101 --workspace 123 --campaign 456 --json
emailx messages approve 101 --workspace 123 --campaign 456 --file approval.json --idempotency-key approve-001 --json
emailx campaigns review-email 456 --workspace 123 --expected-revision REVISION --idempotency-key review-001 --json
emailx campaigns launch-email 456 --workspace 123 --review-id READY_REVIEW_ID --idempotency-key launch-001 --yes --json
emailx campaigns email-progress 456 --workspace 123 --json
```

Generation accepts 1–10 prepared task IDs and consumes AI credits. Review and launch are separate; the ready review expires after five minutes (`expires_at` is authoritative). A `202` operation schedules approved messages within configured windows and does not prove delivery. Poll the original operation; stop at `awaiting_user_action`, `needs_reconciliation`, or a terminal state. Unknown outcomes are never retried automatically. See [email execution](https://docs.emailx.ai/en/overview/email-execution.md).

For People, use `emailx contacts preview-import` first with `--file`, `--mapping` or `--mapping-file`, and `--channel email|linkedin`. Confirm the exact preview fingerprint before calling `emailx contacts import --expected-fingerprint ... --yes`; inspect IDs with `emailx contacts import-rows`. Files are limited to 64 KiB and 1,000 rows. Import saves contacts only; it does not enroll them. LinkedIn-only rows may lack email, but direct `contacts create` still requires email. See [People import](https://docs.emailx.ai/en/overview/people-import.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.