provider Alerts PATCH /alerts/{alert_id}
@utdk/sendgrid /alerts/{alert_id}
Update an alert
**This endpoint allows you to update an alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow 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/).
alert_id path required
The ID of the alert you would like to retrieve.
integer
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.

patchAlertsAlertId
PATCH/alerts/{alert_id}
**This endpoint allows you to update an alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow 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/).

Parameters

required

The ID of the alert you would like to retrieve.

Input

The new email address you want your alert to be sent to. Example: test@example.com

The new frequency at which to send the stats_notification alert. Example: monthly

The new percentage threshold at which the usage_limit alert will be sent. Example: 90

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.patchAlertsAlertId({
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call."
})