The AhaSend CLI is available on GitHub and supports Linux, macOS, and Windows.
Key Features
Email Sending
Send single or batch emails with substitutions, stored templates, attachments, and scheduling
Domain Management
Add, check, and manage sending domains and their DNS records
Templates and Campaigns
Store transactional templates, and draft, test, and send campaigns to contact lists
Contacts and Lists
Manage contacts, import them in batches, and organize them in lists
Webhooks and Routes
Configure event notifications and inbound routes, and test them locally
Analytics
Deliverability, bounce, and delivery time statistics
Why Use the CLI?
- Scripting: Exit codes tell the kind of failure, and
--output jsonprints the API response unchanged - Batch Sending: Concurrent sends with a progress bar, and a file of failed recipients to send again
- Output Formats: Plain text, table, JSON, and CSV
- Profiles: Switch between accounts, such as production and staging
- Local Testing: Webhook and route listeners that forward events to a server on your machine
- Logging:
--verboseand--debuglogs on stderr, with credentials redacted
Quick Example
Log in, check a sending domain you added and configured, and send a sandbox email. Replaceexample.com below with that domain:
Core Capabilities
Email Operations
- Send to recipients given with
--to, or to a JSON or CSV recipients file with per-recipient substitutions - HTML, plain text, and AMP content, inline or from files
- Stored transactional templates with
--template-id - Attachments up to 10 MiB per file
- Scheduled delivery up to 7 days ahead
- Sandbox mode for testing without delivering email
- Message search, details, and cancellation of scheduled messages
Domain Management
- Add sending domains and print the DNS records they need, also in BIND, Cloudflare, and Terraform formats
- Check DNS records and track verification status
- Set the sending type, DKIM, and custom subdomains
Templates and Campaigns
- Store transactional templates, edit drafts, publish them, and restore earlier versions
- Draft, test, send, or schedule campaigns to contact lists
- Campaign statistics, recipients, and campaign templates
Contacts and Lists
- Create, update, and delete contacts, or import them in batches
- Create contact lists, and add, set, or remove their members
Webhook & Route Management
- Stream webhook and route events to your terminal, and forward them to a local server
- Trigger test webhook and route events
- Inbound email route configuration
Analytics & Reporting
- Deliverability statistics
- Bounce statistics
- Delivery time metrics
- CSV output for spreadsheets
Supported Platforms
The CLI is distributed as a single binary with no external dependencies:- macOS: Intel and Apple Silicon
- Linux: x86_64 and ARM64
- Windows: x64 and ARM64
Integration with AhaSend Services
The CLI covers these AhaSend services:- API: Commands call AhaSend API v2
- SMTP: Create SMTP credentials and send test messages over SMTP
- Webhooks: Configure webhooks and test event processing
- Routes: Configure inbound email handling
- Suppressions: List, add, check, and delete suppressed addresses
- API Keys and Sub-accounts: Manage API keys and their scopes, and sub-accounts with their own API keys
Command Groups
- Messages: send, list, get, and cancel messages.
- Domains: create, check, verify, update, and delete sending domains.
- Templates: store transactional templates, with drafts and versions.
- Campaigns: draft, test, send, and report on campaigns, and manage campaign templates.
- Contacts: create, update, list, get, delete, and batch-import account contacts.
- Lists: manage contact lists and their members.
- Webhooks: configure, listen to, and trigger webhooks.
- Routes: configure, listen to, and trigger inbound routes.
- Suppressions: list, create, check, delete, and wipe suppressions.
- SMTP: manage SMTP credentials and send test messages.
- API Keys: manage API keys, their scopes, and IP allow lists.
- Statistics: deliverability, bounce, and delivery time statistics.
- Sub-accounts: manage child accounts, usage, pauses, and their API keys.
- Authentication: log in, switch, check, and log out profiles.
- Ping: test the connection to the API.
Next Steps
Installation
Install the CLI on your system
Quick Start
Send your first email in minutes
Authentication
Set up API credentials
Command Reference
Explore available commands
Support
- GitHub Issues: Report bugs or request features
- Email Support: support@ahasend.com

