Main Content

Alerts API

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.

Alerts API

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 api.thingspeak.com/alerts/history. Use Send Alert to trigger an email message. Use Get 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.

  1. Sign in to ThingSpeak.

  2. Go to Account > My Profile.

  3. 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.

  1. Sign in to ThingSpeak.com

  2. Go to Account > My Profile

The profile page displays your alert balance.

See Also

Functions

Related Topics