shipmail-cli
v0.1.3
Published
Official CLI for the ShipMail API
Maintainers
Readme
Shipmail CLI
Official command line interface for the Shipmail API.
npx -y shipmail-cli --helpAuthentication
Most commands require an API key. Create one in the Shipmail dashboard and export it:
export SHIPMAIL_API_KEY="sm_live_..."You can also pass --api-key to any command. Use SHIPMAIL_BASE_URL or --base-url when targeting a non-production API.
Common Commands
# Check public API health
shipmail status
# Create a domain and verify DNS
shipmail domains create example.com
shipmail domains verify dom_123
# Create a mailbox
shipmail mailboxes create --domain-id dom_123 --address hello --display-name "Hello"
# Send email
shipmail messages send \
--mailbox-id mbx_123 \
--to [email protected] \
--subject "Hello" \
--text "It works."
# Read inbound mail
shipmail inbox list mbx_123 --folder-role inbox --limit 25
shipmail inbox thread mbx_123 thr_123
# Manage webhooks
shipmail webhooks create \
--url https://example.com/shipmail/webhook \
--events message.received,message.bounced
shipmail webhooks deliveries whk_123 --status failedGeneric API Command
The api command reaches every Shipmail REST endpoint, including endpoints that do not have a shorthand command yet.
shipmail api GET /domains
shipmail api PATCH /mailboxes/mbx_123/spam-filter \
--data '{"threshold":6}'
shipmail api PUT /mailboxes/mbx_123/rules \
--data @rules.jsonUse repeatable --header "Name: value" flags for request headers. Use --output path to write non-JSON responses, such as attachment downloads.
Command Surface
statusapi <METHOD> <PATH>domains list|search|create|get|verify|deletemailboxes list|create|get|folders|identities|rulesinbox list|thread|update|movemessages send|list|getwebhooks list|create|test|deliveriessuppressions list|remove
Run shipmail --help for flags and examples.
