Command
nylas deliverability send-alerts create
Create a send alert rule.
Written by Qasim Muhammad Staff SRE
What does nylas deliverability send-alerts create do?
The nylas deliverability send-alerts create command adds a rule that fires the alert.triggered webhook when a sending domain's bounce or complaint rate rises above, or delivery rate falls below, a threshold. It covers only messages sent from an Agent Account or through Transactional send; messages from connected grants such as Google or Microsoft accounts are not included. Each application can have at most 20 rules.
Usage
nylas deliverability send-alerts create --metric METRIC --threshold PERCENT --window-hours HOURS [--min-volume N] [--json]Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --metric | Metric: bounce_rate, complaint_rate, delivery_rate (required) |
| --min-volume | Minimum sends in the window before the rule can fire (default 0) |
| --threshold | Threshold percent, up to 2 decimals; bounce/complaint fire above it (0 to <100), delivery fires below it (>0 to 100) (required) |
| --window-hours | Look-back window in hours, 1-24 (required) |
Examples
The nylas deliverability send-alerts create command adds a rule that fires the alert.triggered webhook when a sending domain's bounce or complaint rate rises above, or delivery rate falls below, a threshold.
Alert when hard bounces exceed 5% in an hour
nylas deliverability send-alerts create --metric bounce_rate --threshold 5 --window-hours 1 --min-volume 50Alert when delivery falls below 95% in a day
nylas deliverability send-alerts create --metric delivery_rate --threshold 95 --window-hours 24Troubleshooting
required flag(s) not set
--metric, --threshold, and --window-hours are required. --min-volume is optional and defaults to 0.
invalid --threshold value
Use a plain percentage with at most 2 decimals, such as 5 or 0.25. bounce_rate and complaint_rate take 0 to under 100; delivery_rate takes over 0 to 100.
an application can have at most 20 alert rules
Delete a rule you no longer need with nylas deliverability send-alerts delete, or change an existing rule with update.
Recommended guides
Track Email Opens, Clicks, and Replies
Send tracked email and receive open, click, and reply events over webhooks from the terminal. Verify the signatures, and learn why email open rates overcount.
SMTP Reply Codes Explained
Decode SMTP reply codes: 2xx success, 4xx transient retry, 5xx permanent. Read bounce DSN enhanced codes and debug delivery from the terminal.
Email Bounce Codes Reference (DSN)
Decode bounce DSNs: RFC 3463 enhanced status codes (5.1.1, 5.2.2, 4.x.x), hard vs soft bounces, and finding them with nylas email search from:mailer-daemon.
Validate Email Addresses from the CLI
Validate email addresses from the terminal with an RFC 5322 syntax check and a dig MX lookup, then gate nylas email send to cut hard bounces.
AI Agent Email Bounce Detection and Retry
Deterministic bounce rules for AI agents: classify soft vs hard from DSN codes, retry 4.x.x with backoff, suppress 5.x.x, and escalate edge cases to humans.
Soft Bounce vs Hard Bounce Explained
Soft bounces (4xx) are transient and retried for up to 5 days; hard bounces (5xx) are permanent. Code ranges, suppression rules, and terminal detection with the CLI.
Run nylas deliverability send-alerts create --help for full help output.