Use the Alerts API to send emails to your ThingSpeak™ account address based on ThingSpeak data, or to trigger an email from a device. For example, you can make a device send you an alert when the soil moisture in your greenhouse drops or when your weather station predicts rain.
The Alerts REST API schedules emails to be sent when you send a request to
api.thingspeak.com/alerts/send. Emails are sent sometime after
the request is received. You can check on the status of your triggered emails using the
Alerts history at
Alert to trigger an email message. Use
History to see the recent history of sent emails and their status.
Generate and View Alerts API Key
The alerts API requires a unique ThingSpeak alerts API key. Before you use alerts for the first time, you need to generate a new alerts API key. You can create your API key on the Account > My Profile page. If you already have an API key and you generate a new key, the old key will ceases to work and you need to update any code that uses the old key.
Sign in to ThingSpeak.
Go to Account > My Profile.
Click the Generate New API Key button to generate an API key.
View Alerts Balance
Each alert consumes one unit from your yearly allotment. View your alerts use, including allowed and remaining alerts, at Account > My Account.
Sign in to ThingSpeak.com
Go to Account > My Profile
The profile page displays your alert balance.