Command Reference
Complete reference for all Envloped CLI commands and flags.
Command Reference
Authentication
envloped login
Authenticate with your Envloped API key.
envloped login --api-key en_xxxxx # Direct flag
envloped login # Interactive promptenvloped logout
Clear stored credentials for the current profile.
envloped logout
envloped logout --profile stagingenvloped whoami
Show the authenticated user and organization info.
envloped whoami
envloped whoami --jsonSending Emails
envloped send
Send an email from the terminal.
# Inline text (with sender name)
envloped send --from "Your Name <hello@mydomain.com>" --to user@example.com \
--subject "Welcome!" --text "Hello world"
# HTML body
envloped send --from "Your Name <hello@mydomain.com>" --to user@example.com \
--subject "Welcome!" --html "<h1>Hello</h1>"
# From file
envloped send --from "Your Name <hello@mydomain.com>" --to user@example.com \
--subject "Newsletter" --html-file template.html
# JSON stdin (best for CI/CD and agents)
echo '{"from":"Your Name <a@b.com>","to":"c@d.com","subject":"Hi","text":"Hello"}' | envloped send --stdin
# Multiple recipients
envloped send --from a@b.com --to user1@example.com --to user2@example.com \
--subject "Broadcast" --text "Hello all"
# Dry run (validate without sending)
envloped send --from a@b.com --to user@example.com --subject "Test" --text "Hi" --dry-run| Flag | Description |
|---|---|
--from | Sender email address (supports "Name <email>" format) |
--to | Recipient email address (repeatable) |
--subject | Email subject |
--html | HTML body |
--text | Plain text body |
--html-file | Read HTML body from file |
--text-file | Read text body from file |
--stdin | Read full email payload as JSON from stdin |
--dry-run | Validate without sending |
Email Management
envloped emails list
List sent emails with optional filtering.
envloped emails list
envloped emails list --status sent
envloped emails list --status failed --limit 10
envloped emails list --search "welcome"
envloped emails list --json| Flag | Description |
|---|---|
--status | Filter by status: sent, failed, bounced |
--search | Search by recipient address or subject |
--limit | Number of results (default: 20) |
--page | Page number (default: 1) |
envloped emails get [id]
Get details for a specific email.
envloped emails get abc123
envloped emails get abc123 --jsonDomain Management
envloped domains list
List all domains for your account.
envloped domains list
envloped domains list --jsonenvloped domains add [domain]
Add a new domain and display DNS records for verification.
envloped domains add mydomain.comenvloped domains verify [domain]
Check the verification status of a domain.
envloped domains verify mydomain.comenvloped domains records [domain]
Re-display DNS records needed to verify a domain.
envloped domains records mydomain.comContacts
Manage marketing contacts (subscribers). See the Contacts API for the underlying endpoints.
envloped contacts list
List contacts with optional filtering.
envloped contacts list
envloped contacts list --status subscribed
envloped contacts list --list ls_newsletter --search "acme"
envloped contacts list --limit 50 --page 2 --json| Flag | Description |
|---|---|
--status | Filter by status: subscribed, unsubscribed, bounced, complained, suppressed, pending |
--list | Filter by list ID |
--search | Search by email |
--limit | Number of results (default: 20) |
--page | Page number (default: 1) |
envloped contacts get [id]
Show a contact's details and its list memberships.
envloped contacts get ct_abc123
envloped contacts get ct_abc123 --jsonenvloped contacts create [email]
Create a contact, optionally adding it to lists.
envloped contacts create jane@example.com
envloped contacts create jane@example.com --first-name Jane --last-name Doe
envloped contacts create jane@example.com --list ls_newsletter --list ls_beta| Flag | Description |
|---|---|
--first-name | Contact first name |
--last-name | Contact last name |
--list | List ID to add the contact to (repeatable) |
--consent-source | Consent source: api, csv_import, form, manual |
envloped contacts update [id]
Update a contact's name or status.
envloped contacts update ct_abc123 --first-name Jane
envloped contacts update ct_abc123 --status unsubscribed| Flag | Description |
|---|---|
--first-name | New first name |
--last-name | New last name |
--status | New status |
envloped contacts delete [id]
Permanently delete a contact (irreversible GDPR hard delete). Requires confirmation unless --force is used.
envloped contacts delete ct_abc123
envloped contacts delete ct_abc123 --forceenvloped contacts export
Export all contacts as CSV to stdout or a file.
envloped contacts export
envloped contacts export --output contacts.csv| Flag | Description |
|---|---|
--output | Write CSV to a file instead of stdout |
envloped contacts import [file]
Bulk create or update contacts from CSV or JSON. Reads stdin when the file
argument is omitted or -.
envloped contacts import contacts.csv
envloped contacts import contacts.csv --list ls_abc123 --member-status approved
cat contacts.json | envloped contacts import --format json| Flag | Description |
|---|---|
--format | auto (default), csv, or json. Sniffed from the extension, then the first byte |
--list | List ID to add every imported contact to (repeatable) |
--member-status | Status for rows that do not carry one — approved (default), rejected, pending, removed |
--attributes-mode | merge (default, server-side) or replace |
--idempotency-key | A replay returns the stored receipt instead of re-running |
--batch-size | Rows per request. Default and maximum 1000 |
CSV shape. A header row is required. email, first_name, last_name,
member_status and list_ids (; or | separated) map to fields; every
other column becomes an attribute under its verbatim header, validated against
your contact fields. A blank attribute cell is
omitted rather than sent, because the server reads "" as clear this
attribute. Read-only export columns (id, status, consent_*, created_at)
are ignored, and the ignored set is printed — so an export → import round
trip does not become a wall of unknown_fields.
Reporting. Two tables follow the counts: rows that did not import, and
rows that imported with data dropped (unknown fields, invalid fields,
invalid list ids). The second table matters — those rows succeed, so it is the
only place a dropped list_id is visible, and a silently dropped list id is how
you mail the wrong audience. The command exits non-zero if any row failed.
Requests larger than --batch-size are chunked, and each chunk gets its own
suffixed idempotency key (key-1, key-2); one key reused across chunks would
make chunk 2 look like a replay of chunk 1 and return chunk 1's receipt.
envloped contacts activity [id]
Show a contact's per-campaign engagement history — every campaign they were sent, with opens, clicks, bounces, complaints, and unsubscribes, plus totals.
envloped contacts activity ct_abc123
envloped contacts activity ct_abc123 --jsonThe table shows proxy-excluded opens. Raw opens are reported separately in the footer, because Apple Mail Privacy Protection prefetches images and inflates them.
Lists
Manage contact lists and membership. See the Lists API for the underlying endpoints.
envloped lists list
List all lists with member counts.
envloped lists list
envloped lists list --jsonenvloped lists get [id]
Show a list's details.
envloped lists get ls_newsletterenvloped lists create [name]
Create a list.
envloped lists create "Newsletter"
envloped lists create "Newsletter" --description "Weekly product digest"| Flag | Description |
|---|---|
--description | List description |
envloped lists update [id]
Rename or re-describe a list.
envloped lists update ls_newsletter --name "Weekly Newsletter"
envloped lists update ls_newsletter --description "Every Monday"| Flag | Description |
|---|---|
--name | New name |
--description | New description |
envloped lists delete [id]
Soft-delete a list (contacts are untouched). Requires confirmation unless --force is used.
envloped lists delete ls_newsletter
envloped lists delete ls_newsletter --forceenvloped lists members [id]
List the members of a list.
envloped lists members ls_newsletter
envloped lists members ls_newsletter --limit 100 --page 2| Flag | Description |
|---|---|
--limit | Number of results (default: 20) |
--page | Page number (default: 1) |
envloped lists add [id] [contactID...]
Add one or more existing contacts to a list.
envloped lists add ls_newsletter ct_abc123
envloped lists add ls_newsletter ct_abc123 ct_def456envloped lists remove [id] [contactID...]
Remove one or more contacts from a list (membership only — the contacts are not deleted).
envloped lists remove ls_newsletter ct_def456Segments
Build and evaluate audience definitions. See the Segments API for the definition grammar.
envloped segments list|get|count
envloped segments list
envloped segments get sg_abc123
envloped segments count sg_abc123
envloped segments count sg_abc123 --quiet # bare integer, pipeableenvloped segments create [name]
envloped segments create "Singapore 25-35" --definition-file ./segment.json
cat segment.json | envloped segments create "Singapore 25-35" --stdin| Flag | Description |
|---|---|
--definition | Condition tree as inline JSON |
--definition-file | Read the condition tree from a file (- for stdin) |
--stdin | Read the condition tree from stdin |
--description | Segment description |
The three input modes are mutually exclusive and one is required. Prefer a file:
a definition is a nested boolean tree, and a shell will mangle the quoting on a
--definition string. Only JSON syntax is checked locally — the grammar is
owned by the API, and duplicating it in the CLI is how two systems drift into
disagreeing about who is in an audience.
A 422 prints every entry from the response's errors array on its own line as
code: path — message, so a rejected tree tells you which leaf to fix.
envloped segments update [id]
envloped segments update sg_abc123 --name "Singapore 25-40"
envloped segments update sg_abc123 --definition-file ./revised.json
envloped segments update sg_abc123 --clear-description| Flag | Description |
|---|---|
--name | New segment name |
--description / --clear-description | Set or clear the description. Cannot be combined |
--definition / --definition-file / --stdin | Replacement condition tree |
Only flags you pass are sent. Replacing the definition changes who a campaign targeting this segment will reach — a segment stores a rule, not a snapshot, so a scheduled campaign resolves the new rule when it fires. The command says so when you change one.
envloped segments delete [id]
envloped segments delete sg_abc123
envloped segments delete sg_abc123 --yesSoft delete. Campaigns that already sent keep their records; campaigns still
targeting it lose an audience source, and a send whose only include source is
gone fails with dead_source rather than quietly mailing nobody. Confirms
first, unless --yes or a non-TTY stdout.
envloped segments preview [id]
Count and sample a definition. With an id it previews a saved segment; without one it evaluates an unsaved tree without persisting it — the try-before-you-commit loop.
envloped segments preview sg_abc123 --limit 25
envloped segments preview --definition-file ./candidate.json| Flag | Description |
|---|---|
--limit | Sample size (server default 25, max 100) |
--definition / --definition-file / --stdin | Preview an unsaved tree |
Campaigns
Draft, target, test, and send marketing campaigns. See the Campaigns API.
envloped campaigns list|get|cancel
envloped campaigns list --page 1 --limit 25
envloped campaigns get cp_abc123
envloped campaigns cancel cp_abc123envloped campaigns create [name]
envloped campaigns create "August newsletter" \
--from "You <hello@yourdomain.com>" \
--subject "What shipped in August" \
--html-file ./newsletter.html \
--include segment:sg_abc123 --exclude segment:sg_churned| Flag | Description |
|---|---|
--from | Sender address |
--reply-to | Reply-to address |
--subject | Subject line |
--html / --html-file | HTML body, inline or from a file |
--source-format | html, visual, or markdown |
--source-body | Body source, when --source-format markdown |
--template | Seed the content from a saved template |
--include / --exclude | Audience source <list|segment|campaign>:<id> (repeatable) |
envloped campaigns update [id]
Takes the same content flags as create, plus --name. Nullable fields are
three-state: an unset flag is omitted, --reply-to "" clears the column, and any
other value replaces it.
envloped campaigns audience|preview
envloped campaigns audience cp_abc123 # show
envloped campaigns audience cp_abc123 --include segment:sg_abc123 # replace
envloped campaigns preview cp_abc123 --limit 25audience with no --include/--exclude reads; with either, it replaces the
whole audience rather than appending. preview resolves the audience to an
eligible recipient count plus a sample, applying the unsubscribe and suppression
gates that a raw segment count does not.
envloped campaigns test [id]
envloped campaigns test cp_abc123 --to you@yourdomain.comenvloped campaigns send [id]
envloped campaigns send cp_abc123
envloped campaigns send cp_abc123 --at 2026-08-11T02:00:00Z
envloped campaigns send cp_abc123 --yes # CI| Flag | Description |
|---|---|
--at | ISO-8601 timestamp at least 60s in the future |
--yes | Skip the confirmation prompt |
This is the one CLI verb that reaches thousands of inboxes and cannot be undone,
so it confirms first — printing the campaign, subject, sender, and the eligible
recipient count from the audience preview before asking. The prompt is skipped
automatically when stdout is not a terminal, so CI is unaffected without
--yes.
A refused send renders the audience snapshot the error carries — included, excluded, eligible, and the per-reason drop breakdown — not just the message.
envloped campaigns delete [id]
envloped campaigns delete cp_abc123
envloped campaigns delete cp_abc123 --yesDeletes a draft, canceled, failed, or sent campaign together with its
recipients and events — the record of what was actually sent, and to whom. An
in-flight campaign must be cancelled first. Confirms before proceeding, unless
--yes or a non-TTY stdout.
envloped campaigns report [id]
envloped campaigns report cp_abc123
envloped campaigns report cp_abc123 --section summary --section links
envloped campaigns report cp_abc123 --json| Flag | Description |
|---|---|
--section | Repeatable: summary, funnel, links, timeseries, activity, all (default) |
The CLI defaults to the full report — a human scrolling 72 rows pays nothing.
Its MCP counterpart defaults to summary for the opposite reason. Same data,
opposite verbosity defaults.
Headline open figures are the proxy-excluded ones. The raw rate appears once, labelled, because Apple Mail Privacy Protection prefetches images and inflates it — on a real campaign that is the difference between an 80.6% open rate and a 62.9% one.
Templates
envloped templates list # TYPE column marks system vs custom
envloped templates list --mine # hide the Envloped starters
envloped templates get tpl_abc123
envloped templates create "Monthly digest" --html-file ./digest.html
envloped templates update tpl_abc123 --name "Monthly digest v2"
envloped templates delete tpl_abc123 --force| Flag | Command | Description |
|---|---|---|
--mine | list | Hide the Envloped system starters |
--from-campaign | create | Copy the source from an existing campaign |
--body-file / --html-file / --design-file | create | Editable source, compiled HTML, or visual-editor design JSON |
--stdin | create | Read the body from stdin. Routed to design_json when --source-format visual, otherwise to the source body |
--source-format | create | html, markdown, or visual |
--description / --category / --thumbnail-url | create, update | Metadata |
--clear-description / --clear-category | update | Clear a field. Cannot be combined with its setter |
System starters (TYPE = system) are readable but not writable — the TYPE
column is the discovery path, rather than a write failing. update is
metadata-only by design; body edits go through a campaign.
Contact Fields
The typed attribute registry that governs what attributes may contain. See
Contact fields.
envloped fields list
envloped fields list --include-archived
envloped fields get fld_abc123
envloped fields create plan --label "Plan" --type text
envloped fields create tier --label "Tier" --type enum --option free --option pro
envloped fields update fld_abc123 --label "Pricing tier"
envloped fields archive fld_abc123| Flag | Description |
|---|---|
--include-archived | Include archived fields in list |
--label | Human-readable label |
--type | text, number, date, boolean, enum, list |
--option | Allowed value for an enum or list field (repeatable) |
archive never drops data — values stay on the contacts and reappear if the key
is re-created.
Suppressions
Addresses Envloped refuses to mail.
envloped suppressions list --reason complaint --limit 50
envloped suppressions get user@example.com
envloped suppressions add user@example.com --notes "emailed support 2026-08-24"
cat unsubscribes.txt | envloped suppressions add --stdin
envloped suppressions delete user@example.com| Flag | Command | Description |
|---|---|---|
--reason | list | hard_bounce, complaint, manual, unsubscribe |
--origin | list | system, api, dashboard, import |
--search | list | Search by address |
--reason | add | manual or unsubscribe only |
--notes | add | Free-text note stored with the suppression |
--stdin | add | Read addresses from stdin, one per line |
--yes | delete | Skip the confirmation prompt |
The two write directions are deliberately asymmetric. Adding is the safe
move — it stops mail, and it is what you run when someone asks to be removed
out-of-band, so it needs no confirmation. Removing re-enables mail to someone
who bounced, complained, or asked you to stop, so it prompts (skipped by --yes
and when stdout is not a terminal), and the server refuses complaint-reason
removals outright.
On list, an unrecognised --reason or --origin is dropped server-side rather
than rejected, so a typo returns the whole unfiltered list with a 200.
Marketing Profile
Your business identity. A campaign send fails its compliance gate without a complete profile, and this is how you find out which field is missing without reading a 403 body.
envloped profile get
envloped profile set --legal-name "Acme Pte Ltd" --address-line1 "1 Raffles Place" \
--city Singapore --postal-code 048616 --country SG| Flag | Description |
|---|---|
--legal-name | Registered legal name (required) |
--dba | Trading name, if different |
--address-line1 / --address-line2 | Street address (line 1 required) |
--city | Required |
--region | State or province |
--postal-code | Required |
--country | Required |
--reply-to | Default reply-to address for campaigns |
get prints the server's completeness verdict, and when incomplete it names the
missing flags and prints a ready-to-paste profile set line. On set, only
flags you actually passed are sent, so unset fields are preserved and
--flag "" clears.
Sender Reputation
envloped reputation
envloped reputation --jsonShows a status banner (healthy / warning / suspended), the SES tenant sending status, and 24h/7d bounce and complaint rates against the thresholds the server echoes back, with a per-row verdict — so a number is interpretable rather than just a number.
When a send is refused with reputation_suspended, this is how you see why and
how bad it is. Recovery is manual: a suspension does not clear on its own, and
the command says so rather than implying it will.
API Key Management
envloped keys list
List all API keys for your account.
envloped keys list
envloped keys list --jsonenvloped keys create [name]
Create a new API key. The key is only displayed once.
envloped keys create "Production Key"
envloped keys create "CI Pipeline Key" --jsonenvloped keys delete [id]
Delete an API key. Requires confirmation unless --force is used.
envloped keys delete abc123
envloped keys delete abc123 --forceMCP Server
envloped mcp
Run the CLI as a Model Context Protocol server, exposing 20 tools to Claude, Cursor, and any MCP client.
envloped mcp # stdio, for a local client
envloped mcp --http --addr :8080 # Streamable HTTP, for a hosted deployment| Flag | Description |
|---|---|
--http | Serve Streamable HTTP instead of stdio |
--addr | Listen address for --http. Defaults to :$PORT, then :8080 |
Over stdio it authenticates with the API key envloped login already stored, so
no key goes in your MCP client's config file. See MCP Server for
client setup and the full tool table.
Note the deliberate asymmetry with the commands above: the CLI can do things
the MCP tools cannot. campaigns send, keys create, every delete, and
suppressions add/delete are reachable here and are not tools. A human at a
terminal is an acceptable operator for bulk sends, credential minting, and
compliance edits; an autonomous agent is not.
Configuration
envloped config set [key] [value]
Set a configuration value.
envloped config set default_from hello@mydomain.com
envloped config set api_url https://api.envloped.comenvloped config get [key]
Get a configuration value.
envloped config get default_fromValid keys: api_url, default_from, output_format
Shell Completions
envloped completion [shell]
Generate shell completion scripts.
# Bash
source <(envloped completion bash)
# Zsh
source <(envloped completion zsh)
# Fish
envloped completion fish | sourceOther
envloped version
Print the CLI version, commit, and build date.
envloped version
# envloped v0.1.0 (commit: abc123, built: 2026-03-28)