Skip to main content
╦ ╦╔╗╔╔═╗╔═╗╔═╗╔╗╔╔╦╗
║ ║║║║║ ║╚═╗║╣ ║║║ ║║
╚═╝╝╚╝╚═╝╚═╝╚═╝╝╚╝═╩╝
One API. Infinite Emails.

Installation

npm install -g unosend

Quick Start

1

Initialize with your API key

terminal
unosend init
2

Send your first email

terminal
unosend send \
  --to [email protected] \
  --from [email protected] \
  --subject "Hello from CLI!" \
  --text "This email was sent from the terminal."

Available Commands

init

Initialize CLI with your API key

send

Send an email

domains

Manage sending domains

logs

View email sending logs

contacts

Manage contacts

audiences

Manage audiences

broadcasts

View broadcasts/campaigns

templates

Manage email templates

webhooks

Manage webhook endpoints

api-keys

Manage API keys

config

View/update configuration

Sending Emails

The send command supports multiple options for sending emails:

Basic text email

terminal
unosend send -t [email protected] -f [email protected] -s "Subject" --text "Body"

HTML email

terminal
unosend send -t [email protected] -f [email protected] -s "Subject" --html "<h1>Hello</h1>"

From HTML file

terminal
unosend send -t [email protected] -f [email protected] -s "Newsletter" --file ./email.html

With CC and BCC

terminal
unosend send -t [email protected] -f [email protected] -s "Subject" --text "Body" \
  --cc "[email protected]" --bcc "[email protected]"

Send Options

OptionDescription
-t, --toRecipient email (required)
-f, --fromSender email (required)
-s, --subjectEmail subject (required)
--htmlHTML content
--textPlain text content
--fileRead HTML from file
--reply-toReply-to address
--ccCC recipients (comma-separated)
--bccBCC recipients (comma-separated)

Managing Domains

terminal
# List all domains
unosend domains list

# Add a new domain
unosend domains add example.com

# Verify domain DNS records
unosend domains verify example.com

# Show domain details
unosend domains show example.com

# Remove a domain
unosend domains remove example.com

Viewing Logs

terminal
# View recent logs
unosend logs

# View more logs
unosend logs --limit 50

# Filter by status
unosend logs --status failed
unosend logs --status delivered

Contacts & Audiences

terminal
# List contacts
unosend contacts list

# Add a contact
unosend contacts add [email protected] --first-name "John" --last-name "Doe"

# List audiences
unosend audiences list

# Create an audience
unosend audiences add "Newsletter Subscribers"

Webhooks

terminal
# List webhooks
unosend webhooks list

# Add a webhook
unosend webhooks add https://example.com/webhook

# View available webhook events
unosend webhooks events

# Remove a webhook
unosend webhooks remove <webhook-id>

API Keys

terminal
# List API keys
unosend api-keys list

# Create a new API key
unosend api-keys create "Production Key"

# Revoke an API key
unosend api-keys revoke <key-id>

Configuration

terminal
# View current config
unosend config --list

# Update API key
unosend config --set apiKey=un_your_new_key

# Reset configuration
unosend init

Getting Help

terminal
# Show all commands
unosend --help

# Get help for a specific command
unosend send --help
unosend domains --help

Next Steps