Skip to content
Skip to main content
POST
https://api.us.nylas.com/v3/alerts/send

Create an alert rule

Creates a rule that watches the bounce, complaint, or delivery rate of each of your sending domains. Nylas checks every rule every 5 minutes. When a domain's rate over the last window_hours crosses the threshold, Nylas sends an alert.triggered notification. Subscribe to that trigger with a webhook to receive it. Rules cover Agent Account and Transactional send messages only.

NYLAS API KEY

Request body

metric*string

The rate to watch. bounce_rate and complaint_rate fire when the rate goes above the threshold, and delivery_rate fires when it goes below.

bounce_ratecomplaint_ratedelivery_rate
Example: "bounce_rate"
threshold*number

The threshold, as a percentage with up to 2 decimal places. For bounce_rate and complaint_rate, at least 0 and less than 100. For delivery_rate, more than 0 and at most 100. The rule fires only when the rate is past the threshold, not equal to it.

Example: 5
window_hours*integer

How many hours of sending the rate covers, from 1 to 24.

Example: 1
min: 1max: 24
min_volumeinteger

The minimum number of messages a sending domain must send in the window before the rule can fire. Use it to avoid alerts on low volume, where one bounce is a high rate.

Default: 0
Example: 50
min: 0max: 1000000000

Responses

request_idstring

The request ID.

dataobject

A rule that sends an alert.triggered webhook when a sending domain's rate crosses a threshold.

POSThttps://api.us.nylas.com/v3/alerts/send

Find your API key in the Nylas Dashboard under API Keys in your application settings.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.