Loading...
Loading...
Generate, send, validate, and export AI-powered emails from the terminal; manage contacts, segments, tags, domains, and webhooks with Migma CLI.
npx skill4agent add migmaai/migma-skills migma--jsonmigma login # Authenticate with your API key
migma whoami --json # Show current user info
migma logout # Remove stored credentials# 1. Create an instant sending domain (no DNS needed)
migma domains managed create <companyname> --json
# → Sends from: hello@<companyname>.migma.email
# 2. Set a default project (brand)
migma projects list --json
migma projects use <projectId>migma emails list --project <projectId> --limit 5 --json--referencemigma generate "Follow-up to the welcome email" --reference <conversationId> --wait --jsonmigma generate "Welcome email for new subscribers" --wait --json--waitconversationIdsubjecthtml--save ./email.html--image <url>--openmigma generate-status <conversationId> --jsonmigma emails list --project <projectId> --json--referencemigma generate "Email 1: Welcome to the course" --wait --json
migma generate "Email 2: Your first lesson" --reference <email1ConversationId> --wait --json
migma generate "Email 3: Advanced tips" --reference <email2ConversationId> --wait --json--referencemigma emails list --project <projectId> --json
migma emails list --project <projectId> --limit 10 --status completed --json
migma emails list --project <projectId> --search "welcome" --json--limit <n>--status <pending|processing|completed|failed>--search <query># Send a generated email directly
migma send --to sarah@example.com --subject "Welcome!" \
--from-conversation <conversationId> \
--from hello@company.migma.email --from-name "Company" --json
# Or send from a local HTML file
migma send --to sarah@example.com --subject "Hello" \
--html ./email.html \
--from hello@company.migma.email --from-name "Company" --json
# Send to an entire segment or tag
migma send --segment <id> --subject "Big News" --html ./email.html \
--from hello@company.migma.email --from-name "Company" --json
# Personalize with template variables
migma send --to user@example.com --subject "Hi {{name}}" --html ./email.html \
--from hello@company.migma.email --from-name "Company" \
--var name=Sarah --var discount=20 --json
# Transactional email (bypasses subscription status and topic filters)
migma send --to user@example.com --subject "Your receipt" \
--html ./receipt.html --transactional \
--from hello@company.migma.email --from-name "Company" --json
# Custom reply-to address
migma send --to user@example.com --subject "Hello" \
--html ./email.html --reply-to support@company.com \
--from hello@company.migma.email --from-name "Company" --json--from-conversationmigma send-test <conversationId> --to test@company.com --jsonmigma batch-status <batchId> --jsonmigma validate all --html ./email.html --json
migma validate all --conversation <conversationId> --json
migma validate all --html ./email.html --subject "Sale today!" --jsonmigma validate compatibility --html ./email.html --json
migma validate links --html ./email.html --json
migma validate spelling --html ./email.html --json
migma validate deliverability --html ./email.html --subject "Sale today!" --json
migma validate deliverability --conversation <conversationId> --subject "Sale today!" --json--subjectmigma export html <conversationId> --output ./email.html
migma export mjml <conversationId> --output ./email.mjml
migma export pdf <conversationId> --output ./email.pdf --json
migma export klaviyo <conversationId> --type html --json
migma export mailchimp <conversationId> --json
migma export hubspot <conversationId> --json--type <html|hybrid|code>--output <file># Add a contact (full options)
migma contacts add --email user@example.com --first-name John --last-name Doe \
--country US --language en --tags tag1,tag2 --json
# List contacts with filters
migma contacts list --json
migma contacts list --status subscribed --tags tagId1,tagId2 --search "john" --json
migma contacts list --limit 50 --page 2 --json
# Get, update, remove
migma contacts get <id> --json
migma contacts update <id> --first-name Jane --status subscribed --json
migma contacts remove <id> --json
# Bulk import from CSV
migma contacts import ./contacts.csv --json--limit <n>--page <n>--status <status>--tags <comma-separated>--search <query>migma tags create --name "VIP" --color "#FF5733" --description "High-value customers" --json
migma tags list --json
migma tags list --search "vip" --sort-by name --json
migma tags delete <id> --json--limit <n>--search <query>--sort-by <createdAt|name>migma segments create --name "Active Users" --description "Users active in last 30 days" --json
migma segments create --name "VIP Subscribers" --tags tagId1,tagId2 --status subscribed --json
migma segments list --json
migma segments get <id> --json
migma segments delete <id> --json# List all domains
migma domains list --json
# Add a custom domain (requires DNS setup)
migma domains add yourdomain.com --json
migma domains add yourdomain.com --region eu-west-1 --json
# Verify DNS records
migma domains verify yourdomain.com --json
# Instant managed domain (no DNS needed)
migma domains managed create companyname --json
# → hello@companyname.migma.email is ready immediately
# Remove a managed domain
migma domains managed delete companyname.migma.email --json# List webhooks
migma webhooks list --json
# Create a webhook
migma webhooks create \
--url https://yourserver.com/webhook \
--events email.sent,email.delivered,email.bounced \
--description "Production webhook" --json
# Test a webhook (sends a test payload)
migma webhooks test <webhookId> --json
# Delete a webhook
migma webhooks delete <webhookId> --jsonmigma projects import https://yourbrand.com --wait --json
migma projects use <projectId>--json{"error": {"message": "Not found", "code": "not_found", "statusCode": 404}}