provider Alerts POST /alerts
@utdk/sendgrid /alerts
Create a new Alert
**This endpoint allows you to create a new alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. There are two types of alerts that can be created with this endpoint: * `usage_limit` allows you to set the threshold at which an alert will be sent. * `stats_notification` allows you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
Authorization header
string
on-behalf-of header
string

Try it

Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

postAlerts
POST/alerts
**This endpoint allows you to create a new alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. There are two types of alerts that can be created with this endpoint: * `usage_limit` allows you to set the threshold at which an alert will be sent. * `stats_notification` allows you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).

Input

required

The email address the alert will be sent to. Example: test@example.com

Required for stats_notification. How frequently the alert will be sent. Example: daily

Required for usage_alert. When this usage threshold is reached, the alert will be sent. Example: 90

required

The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.postAlerts()