groundmail-cli 0.20.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +18 -0
  2. package/dist/cli.js +563 -158
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -63,6 +63,24 @@ SENDGRID_API_KEY=… groundmail migrate sendgrid --dry-run # import from SendG
63
63
 
64
64
  Run `groundmail --help` or `groundmail <command> --help` for flags.
65
65
 
66
+ ## Tenants
67
+
68
+ If you send email for your own customers, give each one a tenant: its own domains,
69
+ suppression list, stats, pause switch and daily limit (Scale and Dedicated plans).
70
+
71
+ ```bash
72
+ groundmail tenants create cus_123 --name Acme --daily-limit 5000
73
+ groundmail tenants domains add cus_123 mail.acme.com
74
+ groundmail emails send --tenant cus_123 --from billing@mail.acme.com --to user@example.com --subject 'Invoice' --text 'Thanks!'
75
+ groundmail tenants stats cus_123 --days 7
76
+ groundmail tenants pause cus_123 --reason 'Unpaid invoice'
77
+ groundmail tenants resume cus_123
78
+ ```
79
+
80
+ `--tenant` also works on `emails list`, `emails batch`, `domains add`, `domains list`,
81
+ `suppressions` and `keys create` (a key limited to one tenant). `webhooks create` and
82
+ `webhooks update` take `--tenants a,b` to receive only those tenants' email events.
83
+
66
84
  ## Docs
67
85
 
68
86
  - CLI: https://docs.groundmail.dev/cli