A command-line interface and a TUI dashboard for the MailerSend API. Use it to send emails and SMS, and to manage domains, templates, webhooks, recipients, and suppressions from the terminal.
brew install mailersend/tap/mailersendmacOS and Linux:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mailersend/mailersend-cli/releases/latest/download/mailersend-installer.sh | shWindows (PowerShell):
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mailersend/mailersend-cli/releases/latest/download/mailersend-installer.ps1 | iex"The Linux build is static, so it runs on any distribution: Alpine, and older ones like Ubuntu 20.04, Debian 11, RHEL 8 and Amazon Linux 2. The installer picks it when the system glibc is older than 2.35 or the system uses musl.
Download binaries for Linux, macOS, and Windows from the releases page.
cargo install --git https://github.com/mailersend/mailersend-cli.gitInstall a Rust toolchain from rustup.rs first.
git clone https://github.com/mailersend/mailersend-cli.git
cd mailersend-cli
cargo build --releaseMove the binary to a directory on your $PATH:
sudo mv target/release/mailersend /usr/local/bin/Run the CLI without installation:
nix run git+ssh://git@github.com/mailersend/mailersend-cli.gitInstall the CLI into your profile:
nix profile install git+ssh://git@github.com/mailersend/mailersend-cli.gitOr add the CLI to a flake.nix:
{
inputs.mailersend-cli.url = "git+ssh://git@github.com/mailersend/mailersend-cli.git";
# then use: inputs.mailersend-cli.packages.${system}.default
}The CLI has two authentication methods: OAuth (recommended) and API token.
mailersend auth loginThe command opens the browser and authorizes the CLI with your MailerSend account. You do not create or paste tokens - the CLI does this for you. The CLI refreshes OAuth tokens automatically when they expire.
On a server, in a container or over SSH, sign in with a code instead:
mailersend auth login --method deviceThe CLI prints a link and a short code, and waits. Open the link in a browser on any machine, check that the code matches and approve the sign in. The link expires after 10 minutes.
You can also authenticate with an API token:
mailersend auth login --method tokenThe CLI asks for your MailerSend API token. Create a token in your MailerSend dashboard under API Tokens.
The "Copy prompt" card in the MailerSend dashboard gives your coding agent a prompt with a one-time setup code. The agent signs in with it:
mailersend auth login --setup-code mss_...The code works once and expires after 10 minutes. On the machine where you copied the prompt, the CLI signs in without a browser. On another machine it prints a link and a code like --method device, and waits until you approve the sign in in the browser. The approval page offers only the account of the code. The CLI checks that the sign in is for the user and the account of the code, and saves nothing if it is not. After the sign in it prints the next setup steps. See Agent setup.
Show the authentication status:
mailersend auth statusLog out:
mailersend auth logoutYou can keep more than one profile:
mailersend profile add staging --token mlsn_staging_token
mailersend profile add production --token mlsn_production_token
mailersend profile list
mailersend profile switch stagingUse a specific profile for one command:
mailersend domain list --profile productionYou can also set the API token with an environment variable:
export MAILERSEND_API_TOKEN="mlsn.your_token_here"Token resolution order: MAILERSEND_API_TOKEN env var > --profile flag > active profile > the first profile by name when no profile is active. Inside a profile, an API token is used before an OAuth token.
Profiles are stored in ~/.config/mailersend/config.yaml, or in $XDG_CONFIG_HOME/mailersend/config.yaml when XDG_CONFIG_HOME is set. On Windows the file is in .config\mailersend in your user folder, the same file for PowerShell, cmd and Git Bash.
The CLI sends requests through the proxy in https_proxy, http_proxy or all_proxy (upper case works too). Only http:// proxies are supported. A user name and password in the proxy URL are sent to the proxy. Hosts in no_proxy are reached directly: a host, a domain like .example.com, or * for every host.
export https_proxy=http://proxy.example.com:3128
export no_proxy=localhost,.internal.example.comThe CLI trusts its bundled certificates and the system ones: the Windows certificate store, the macOS keychain, or the CA bundle on Linux. A proxy that inspects TLS works when its CA is in the system store. SSL_CERT_FILE and SSL_CERT_DIR replace the system certificates with the ones in that file or folder; the bundled ones stay.
Every command accepts these flags:
| Flag | Description |
|---|---|
--json |
Output raw JSON instead of formatted tables |
--verbose, -v |
Print HTTP request and response details |
--profile <name> |
Use a specific auth profile |
--help, -h |
Show help for any command |
Start the interactive TUI dashboard:
mailersend dashboardThe dashboard gives you a lazygit-style interface with vim keybindings. Use the sidebar, or the keys 1 to 7, to move between domains, activity, analytics, messages, suppressions, templates and the email log. Press ? for help. Press q to quit.
Addresses take email or "Name <email>". --to, --cc and --bcc can be repeated or comma-separated: up to 50 to, 10 cc and 10 bcc.
# Send an email
mailersend email send \
--from "sender@yourdomain.com" \
--from-name "Sender Name" \
--to "Recipient <recipient@example.com>" \
--subject "Hello" \
--text "Plain text body" \
--html "<h1>HTML body</h1>"
# Several recipients, cc, bcc and reply-to
mailersend email send \
--from "sender@yourdomain.com" \
--to "ann@example.com,Bob <bob@example.com>" \
--cc "carol@example.com" \
--bcc "audit@yourdomain.com" \
--reply-to "support@yourdomain.com" --reply-to-name "Support" \
--subject "Hello" \
--text "Body"
# Send from a file
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--subject "Newsletter" \
--html-file ./newsletter.html \
--text-file ./newsletter.txt
# Send using a template, personalized for every recipient
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--template-id "x2p0347z969lzdrn" \
--var name=Ann --var plan=Pro
# Different values per recipient
mailersend email send \
--from "sender@yourdomain.com" \
--to "ann@example.com,bob@example.com" \
--subject "Hi {{name}}" \
--text "Hi {{name}}" \
--personalization-file ./personalization.json
# Attachments and inline images (<img src="cid:logo">)
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--subject "Invoice" \
--html '<img src="cid:logo"><p>Your invoice</p>' \
--attach ./invoice.pdf \
--inline logo=./logo.png
# Schedule an email (ISO 8601 or unix timestamp, up to 72 hours ahead)
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--subject "Scheduled" \
--text "This is scheduled" \
--send-at 2026-12-01T10:00:00Z
# Tracking on or off (default: the domain setting), and tags
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--subject "Tracked" \
--text "Body" \
--track-clicks --track-opens=false \
--tags "campaign,welcome"
# Headers, threading and more
mailersend email send \
--from "sender@yourdomain.com" \
--to "recipient@example.com" \
--subject "Re: Order 1234" \
--text "Body" \
--header "X-Order-Id: 1234" \
--in-reply-to "<abc@yourdomain.com>" \
--references "<abc@yourdomain.com>" \
--language de \
--list-unsubscribe "<mailto:unsubscribe@yourdomain.com>" \
--precedence-bulk=false
# Send a complete request body as documented for POST /v1/email
mailersend email send --json-file ./email.jsonemail send prints a warning when the API reports suppressed recipients, and exits with code 1 when all recipients are suppressed and nothing is sent.
# Emails sent from a domain, newest first (default: the last 7 days)
mailersend email list --domain yourdomain.com
mailersend email list --domain yourdomain.com --date-from 2026-11-01 --date-to 2026-11-30 --limit 100
# Filters
mailersend email list --domain yourdomain.com --status delivered,rejected --interaction opened
mailersend email list --domain yourdomain.com --recipient ann@example.com
mailersend email list --domain yourdomain.com --subject "Order" --tag receipt
mailersend email list --domain yourdomain.com --template-id <template_id> --message-id <message_id>
# One email with its content and activity
mailersend email get <email_id># Send bulk email from a JSON file
mailersend bulk-email send --file emails.json
# Check bulk email status: validation errors and suppressed recipients
mailersend bulk-email status <bulk_email_id>
# Wait until the bulk send is completed or failed (gives up after 30 minutes)
mailersend bulk-email status <bulk_email_id> --waitThe JSON file contains an array of email objects:
[
{
"from": {"email": "sender@yourdomain.com"},
"to": [{"email": "recipient1@example.com"}],
"subject": "Bulk Email 1",
"text": "Hello from bulk"
},
{
"from": {"email": "sender@yourdomain.com"},
"to": [{"email": "recipient2@example.com"}],
"subject": "Bulk Email 2",
"text": "Hello from bulk"
}
]# List domains
mailersend domain list
mailersend domain list --limit 10
# Get domain details
mailersend domain get yourdomain.com
# Add a new domain
mailersend domain add --name yourdomain.com
mailersend domain add --name yourdomain.com --return-path-subdomain mta --custom-tracking-subdomain email --inbound-routing-subdomain inbound
# Show DNS records
mailersend domain dns yourdomain.com
# Get a link that adds the DNS records at your DNS provider. The same link until
# the setup finishes, a new one after a failed setup. No link when the domain is
# verified, when the setup is finished (run `domain verify`), or when the provider
# does not support it (add the records from `domain dns` by hand)
mailersend domain dns-setup-link yourdomain.com
# Verify domain
mailersend domain verify yourdomain.com
# Keep checking until the domain is verified (gives up after 5 minutes by default)
mailersend domain verify yourdomain.com --wait
mailersend domain verify yourdomain.com --wait --timeout 15m --interval 1m
# Update domain settings
mailersend domain update-settings yourdomain.com --track-clicks --track-opens=false
# Unsubscribe link text
mailersend domain update-settings yourdomain.com \
--track-unsubscribe \
--track-unsubscribe-html '<p><a href="{{unsubscribe}}">Unsubscribe</a></p>' \
--track-unsubscribe-html-enabled \
--track-unsubscribe-plain 'Unsubscribe: {{unsubscribe}}' \
--track-unsubscribe-plain-enabled
# Recipients of a domain
mailersend domain recipients yourdomain.com --limit 20
# Delete a domain
mailersend domain delete yourdomain.com# List recipients
mailersend recipient list --limit 20
# List recipients for a specific domain
mailersend recipient list --domain yourdomain.com
# Get recipient details
mailersend recipient get <recipient_id>
# Delete a recipient
mailersend recipient delete <recipient_id># List identities
mailersend identity list --limit 10
mailersend identity list --domain yourdomain.com
mailersend identity list --query support@ --order-by created_at --order desc
# Create an identity
mailersend identity create \
--domain yourdomain.com \
--name "Support" \
--email "support@yourdomain.com"
# Get identity (by ID or email)
mailersend identity get <id>
mailersend identity get support@yourdomain.com
# Update an identity
mailersend identity update <id> --name "Customer Support"
# Resend the verification email (by ID or email)
mailersend identity resend support@yourdomain.com
# Delete an identity
mailersend identity delete <id># List templates
mailersend template list
mailersend template list --limit 10 --domain yourdomain.com
# Get template details
mailersend template get <template_id>
# Create a template from HTML and plain text
mailersend template create \
--name "Welcome" \
--html-file ./welcome.html \
--text-file ./welcome.txt \
--domain yourdomain.com \
--tags welcome
# Update a template created through the API
mailersend template update <template_id> --html-file ./welcome.html --auto-generate
# Delete a template
mailersend template delete <template_id># List webhooks
mailersend webhook list --domain yourdomain.com
# Only webhooks with payload version 1
mailersend webhook list --domain yourdomain.com --version 1
# Create a webhook (always payload version 2)
mailersend webhook create \
--domain yourdomain.com \
--name "My Webhook" \
--url "https://example.com/webhook" \
--events "activity.sent,activity.delivered" \
--enabled=false \
--editable
# Get webhook details
mailersend webhook get <webhook_id>
# Update a webhook
mailersend webhook update <webhook_id> --name "Updated Webhook"
# Delete a webhook
mailersend webhook delete <webhook_id>
# Move version 1 webhooks to version 2
mailersend webhook upgrade --all --dry-run
mailersend webhook upgrade --all
mailersend webhook upgrade <webhook_id>Version 1 webhooks stopped working on December 1, 2026. Version 2 changes the payload format, so update the receiving endpoint before you upgrade.
# List messages
mailersend message list --limit 10
mailersend message list --domain yourdomain.com
# Get message details
mailersend message get <message_id>
# List scheduled messages
mailersend message scheduled list --domain yourdomain.com --status scheduled
# Get scheduled message
mailersend message scheduled get <message_id>
# Cancel a scheduled message
mailersend message scheduled delete <message_id># List activity for a domain (default: the last 7 days)
mailersend activity list --domain yourdomain.com
mailersend activity list --domain yourdomain.com --date-from 2026-11-01 --date-to 2026-11-30 --event opened,clicked
# Get activity details
mailersend activity get <activity_id># Analytics by date
mailersend analytics date --domain yourdomain.com --date-from 2025-01-01 --date-to 2025-01-31 --event sent,delivered,opened
mailersend analytics date --date-from 2025-01-01 --date-to 2025-03-31 --event sent --group-by weeks --tags welcome
# Analytics by country
mailersend analytics country --domain yourdomain.com --date-from 2025-01-01 --date-to 2025-01-31
# Analytics by user agent name
mailersend analytics ua-name --domain yourdomain.com --date-from 2025-01-01 --date-to 2025-01-31
# Analytics by user agent type
mailersend analytics ua-type --domain yourdomain.com --date-from 2025-01-01 --date-to 2025-01-31Manage blocklist, hard bounces, spam complaints, unsubscribes, and on-hold entries.
# List suppressions (works for all types)
mailersend suppression blocklist list --limit 10
mailersend suppression hard-bounces list --limit 10
mailersend suppression spam-complaints list --limit 10
mailersend suppression unsubscribes list --limit 10
mailersend suppression on-hold list --limit 10
# Filter by domain
mailersend suppression blocklist list --domain yourdomain.com
# Add to blocklist (by recipient email)
mailersend suppression blocklist add --domain yourdomain.com --recipients "spam@example.com"
# Add to the account-wide blocklist (no domain)
mailersend suppression blocklist add --recipients "spam@example.com"
# Add to blocklist (by pattern)
mailersend suppression blocklist add --domain yourdomain.com --patterns "*@spamdomain.com"
# Add hard bounce / spam complaint / unsubscribe
mailersend suppression hard-bounces add --domain yourdomain.com --recipients "bounce@example.com"
mailersend suppression spam-complaints add --domain yourdomain.com --recipients "spam@example.com"
mailersend suppression unsubscribes add --domain yourdomain.com --recipients "unsub@example.com"
# Delete specific entries
mailersend suppression blocklist delete --ids id1,id2
# Delete all entries for a domain
mailersend suppression blocklist delete --all --domain yourdomain.comFilters take COMPARER:VALUE, and HEADER:COMPARER:VALUE for match_header. Comparers: equal, not-equal, contains, not-contains, starts-with, ends-with, not-starts-with, not-ends-with. Up to 5 of each.
# List inbound routes
mailersend inbound list --domain yourdomain.com --limit 10
# Create an inbound route
mailersend inbound create \
--domain yourdomain.com \
--name "My Inbound Route" \
--match-filter-type match_all \
--inbound-domain inbound.yourdomain.com \
--inbound-priority 0 \
--catch-filter-type catch_all \
--forwards "https://example.com/inbound"
# Catch some recipients, match some senders, drop attachments
mailersend inbound create \
--domain yourdomain.com \
--name "Support" \
--inbound-domain inbound.yourdomain.com \
--catch-filter-type catch_recipient \
--catch-filter equal:support --catch-filter starts-with:help \
--catch-type one \
--match-filter-type match_sender \
--match-filter ends-with:@customer.com \
--include-attachments=false \
--forwards "email:team@yourdomain.com,webhook:https://example.com/inbound"
# Use the MailerSend address only, without an inbound domain
mailersend inbound create \
--domain yourdomain.com \
--name "Plain" \
--domain-enabled=false \
--match-filter-type match_all \
--forwards "https://example.com/inbound"
# Get route details
mailersend inbound get <route_id>
# Update a route; flags you leave out keep their stored values
mailersend inbound update <route_id> --name "Updated Route"
# Delete a route
mailersend inbound delete <route_id># List tokens
mailersend token list --limit 10
# Get token details
mailersend token get <token_id>
# Create a token (mailersend token create --help lists every scope)
mailersend token create \
--name "My Token" \
--domain yourdomain.com \
--scopes "email_full,domains_read"
# A token not tied to one domain
mailersend token create --name "Account Token" --scopes "analytics_read"
# Write the token to an env file instead of printing it (MAILERSEND_API_KEY by default)
mailersend token create --name "App" --scopes "email_full" --save-to .env
mailersend token create --name "App" --scopes "email_full" --save-to .env --env-key API_KEY
# Update token name
mailersend token update <token_id> --name "Renamed Token"
# Pause / unpause a token
mailersend token update-status <token_id> --status pause
mailersend token update-status <token_id> --status unpause
# Delete a token
mailersend token delete <token_id># List users
mailersend user list
# Get user details
mailersend user get <user_id>
# Update a user
mailersend user update <user_id> --role admin
mailersend user update <user_id> --role admin --requires-periodic-password-change
# Delete a user
mailersend user delete <user_id># List invites
mailersend user invite list
# Create an invite
mailersend user invite create --email "newuser@example.com" --role "custom"
mailersend user invite create --email "newuser@example.com" --role "Admin" --requires-periodic-password-change
# Get invite details
mailersend user invite get <invite_id>
# Resend an invite
mailersend user invite resend <invite_id>
# Cancel an invite
mailersend user invite cancel <invite_id>All SMTP commands require --domain.
# List SMTP users
mailersend smtp list --domain yourdomain.com
# Get SMTP user details
mailersend smtp get <smtp_user_id> --domain yourdomain.com
# Create an SMTP user (the password is returned only once: use --save-to or --json)
mailersend smtp create --domain yourdomain.com --name "My SMTP User"
# Write host, port, username and password to an env file
# (MAILERSEND_SMTP_HOST, _PORT, _USERNAME, _PASSWORD by default)
mailersend smtp create --domain yourdomain.com --name "App" --save-to .env
# Another prefix, here MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD
mailersend smtp create --domain yourdomain.com --name "App" --save-to .env --env-prefix MAIL_
# Update an SMTP user
mailersend smtp update <smtp_user_id> --domain yourdomain.com --name "Updated SMTP"
# Delete an SMTP user
mailersend smtp delete <smtp_user_id> --domain yourdomain.com# Daily request quota, used, remaining and when it resets
mailersend quota# Plan, email usage, rate limits, resource limits and add-ons
mailersend account
# Approval status: can the approval form be sent, what is missing first,
# the allowed answers and the answers saved before
mailersend account approval
# Send the approval form (only the given answers are sent)
mailersend account approval submit \
--website https://example.com \
--about-company "We sell handmade furniture online and ship across Europe." \
--types transactional,marketing \
--use-case "Order confirmations, shipping updates and a monthly newsletter" \
--marketing-sources Website \
--marketing-opt-in-urls https://example.com/newsletter \
--double-opt-in yes \
--double-opt-in-consent "Sign-ups confirm by clicking a link in an email"Email examples can be added to the form in the app only.
# Verify a single email
mailersend verification verify user@example.com
# Verify asynchronously
mailersend verification verify-async user@example.com
# Check async verification status
mailersend verification status <verification_id>
# List verification lists
mailersend verification list list
# Create a list and start verifying it right away
mailersend verification list create --name "Newsletter" --emails-file ./emails.txt --verify
# Add emails to an existing list
mailersend verification list create --list-id <list_id> --emails "a@example.com,b@example.com"
# Start verification and wait until it finishes
mailersend verification list verify <list_id> --wait
# List details, with the emails and their results
mailersend verification list get <list_id> --detailed --page 1 --limit 100
# Results, filtered by result
mailersend verification list results <list_id> --status valid,role_basedSMS commands need SMS enabled on your MailerSend account.
mailersend sms send --from "+1234567890" --to "+0987654321" --text "Hello from CLI"
# Personalized ({{ name }} in the text)
mailersend sms send --from "+1234567890" --to "+0987654321" --text "Hi {{ name }}" --var name=Ann
mailersend sms send --from "+1234567890" --to "+0987654321,+1987654321" --text "Hi {{ name }}" --personalization-file ./sms-personalization.jsonmailersend sms message list --limit 10
mailersend sms message get <message_id>mailersend sms activity list --limit 10
mailersend sms activity list --sms-number-id <id> --date-from 2025-01-01 --date-to 2025-12-31
# Filter by status: processed, queued, sent, delivered, failed
mailersend sms activity list --status delivered,failedmailersend sms number list --limit 10
mailersend sms number list --paused
mailersend sms number get <number_id>
mailersend sms number update <number_id> --paused
mailersend sms number update <number_id> --paused=false
mailersend sms number delete <number_id>mailersend sms recipient list --limit 10
mailersend sms recipient list --sms-number-id <id>
mailersend sms recipient get <recipient_id>
mailersend sms recipient update <recipient_id> --status opt_outFilter comparers: equal, not-equal, contains, not-contains, starts-with, ends-with, not-starts-with, not-ends-with. Set --filter-comparer and --filter-value together.
mailersend sms inbound list --limit 10
mailersend sms inbound list --sms-number-id <id> --enabled=true
mailersend sms inbound create \
--sms-number-id <id> \
--name "My SMS Route" \
--forward-url "https://example.com/sms-hook"
mailersend sms inbound create \
--sms-number-id <id> \
--name "Stop keywords" \
--forward-url "https://example.com/sms-hook" \
--filter-comparer starts-with \
--filter-value STOP
mailersend sms inbound get <route_id>
mailersend sms inbound update <route_id> --name "Updated SMS Route"
mailersend sms inbound update <route_id> --enabled=false
mailersend sms inbound delete <route_id>mailersend sms webhook list --sms-number-id <id>
mailersend sms webhook create \
--sms-number-id <id> \
--name "My SMS Webhook" \
--url "https://example.com/sms-webhook" \
--events "sms.sent,sms.delivered"
mailersend sms webhook get <webhook_id>
mailersend sms webhook update <webhook_id> --name "Updated SMS Webhook"
mailersend sms webhook delete <webhook_id>A monitor is addressed by its ID or by its domain name.
# List, create, update and delete monitors
mailersend dmarc list
mailersend dmarc create --domain yourdomain.com
mailersend dmarc update yourdomain.com --wanted-record "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"
mailersend dmarc delete yourdomain.com
# Aggregated report, one row per sending IP (* marks favorites)
mailersend dmarc report yourdomain.com --date-from 2026-11-01 --date-to 2026-11-30
# Detailed reports for one IP
mailersend dmarc ip-report yourdomain.com 192.0.2.1
# Organizations that sent reports (default: the last 7 days)
mailersend dmarc sources yourdomain.com --status rejected
# Favorite IPs
mailersend dmarc favorite yourdomain.com 192.0.2.1
mailersend dmarc unfavorite yourdomain.com 192.0.2.1# List monitors and get one with its hits (or the IPs of a range)
mailersend blocklist-monitor list
mailersend blocklist-monitor get <monitor_id>
# Watch a domain, an IP or a CIDR range
mailersend blocklist-monitor create --address yourdomain.com --notify-email alerts@yourdomain.com
mailersend blocklist-monitor create --address 192.0.2.0/30 --name "Dedicated IPs" --notify-url https://example.com/hook
# Update and delete
mailersend blocklist-monitor update <monitor_id> --notify=false
mailersend blocklist-monitor delete <monitor_id>WhatsApp commands need the WhatsApp add-on and a connected sender.
# Templates (only approved ones can be sent)
mailersend whatsapp template list --status approved
mailersend whatsapp template get <template_id>
# Send a template to up to 10 recipients
mailersend whatsapp send \
--from 15550001234 \
--to +48600000001 \
--template-id <template_id> \
--body-var John --body-var "December 31"
# Media header, URL button, or a personalization file for named variables
mailersend whatsapp send --from 15550001234 --to +48600000001 --template-id <template_id> \
--header-media https://example.com/invoice.pdf --header-filename invoice.pdf --button-var order-1234
mailersend whatsapp send --from 15550001234 --to +48600000001 --template-id <template_id> \
--personalization-file ./whatsapp-personalization.json
# Sent messages, per-recipient items and delivery events (kept for 7 days)
mailersend whatsapp message list
mailersend whatsapp message get <message_id>
mailersend whatsapp item list --message-id <message_id> --status delivered,read
mailersend whatsapp item get <item_id>
mailersend whatsapp activity list --message-id <message_id> --type failed
# Received messages and recipients
mailersend whatsapp inbound list --type text
mailersend whatsapp inbound get <inbound_message_id>
mailersend whatsapp recipient list --status active
mailersend whatsapp recipient get <recipient_id>Commands a coding agent uses when it sets up your account from the dashboard prompt. Sign in first with mailersend auth login --setup-code <code>.
# Report a setup step to the checklist in the dashboard (status: done by default)
mailersend setup step credentials_saved
mailersend setup step domain_verified --status waiting_for_customer --detail "SPF is missing"
# Send a test email to your own address and wait for the delivery
mailersend setup test-email --domain yourdomain.com
# Send it with the API key saved in an env file, to prove the key works
mailersend setup test-email --domain yourdomain.com --env-file .env
# Send it through SMTP with the credentials saved in an env file
mailersend setup test-email --domain yourdomain.com --env-file .env --smtp
# Print the link to choose a plan, preselected (the quota is rounded up to a plan step)
mailersend setup plan --plan starter --quota 50000
mailersend setup plan --plan professional --quota 250000 --interval year
# Add the MailerSend MCP server to your coding agent (Claude Code, Cursor or VS Code)
mailersend setup mcp
mailersend setup mcp --agent cursorsetup stepuses the run code saved at sign in. A report that fails is only a warning and the command still succeeds, so the setup carries on.setup test-emailalways sends to the address of the signed in user. There is no flag for another recipient.setup planonly prints a link. Nothing is bought until the customer confirms on the billing page. The plan ishobby,starterorprofessional, the intervalmonthoryear.setup mcpdetects the agent from the terminal it runs in and writes.mcp.json,.cursor/mcp.jsonor.vscode/mcp.jsonin the current folder. Other servers in the file stay as they are. No credentials are written: the MCP server asks you to log in on first use.
--save-to on token create and smtp create keeps new credentials out of the agent chat: the value goes to the file only, also with --json and --verbose. An existing variable in the file is replaced and every other line stays as it is. A new file is created readable only by you. The CLI warns when the file is not ignored by git.
Every flag that accepts --domain accepts a domain name (for example yourdomain.com) or a raw domain ID (for example q3enl6kk0z042vwr). The CLI resolves a domain name to the matching ID automatically.
Generate a completion script for your shell:
# Bash
source <(mailersend completion bash)
# Zsh
mailersend completion zsh > "${fpath[1]}/_mailersend"
# Fish
mailersend completion fish | source
# PowerShell
mailersend completion powershell | Out-String | Invoke-ExpressionAdd --json to a command to get raw JSON output. Use it in scripts:
# Pipe to jq
mailersend domain list --json | jq '.[].name'
# Extract an ID
mailersend identity create --domain yourdomain.com --name "Test" --email "test@yourdomain.com" --json | jq -r '.data.id'-v writes the HTTP trace to stderr, so --json -v still gives valid JSON on stdout. Warnings, like a deprecated API version, also go to stderr.
See LICENSE for details.