Skip to main content
MailChannels raises an alert when a sender trips one of your monitors, for example when it starts sending spam or is added to a blocklist. The Log Search API gives you two ways to read those alerts for a sender:
  • POST /alerts lists each alert.
  • POST /alertcount counts alerts by hour, day, or week.
If you want to react to alerts as they happen, use webhooks instead. Use these endpoints to look back at a sender’s history, for example when you investigate an abuse report. Before you start, read Before you begin.

List alerts

Request fields

Response

The response is a JSON array of alerts. It is empty when there are no alerts.

Alert types

Use these values for condition_name:

Count alerts over time

POST /alertcount takes the same sender_id, start_date, end_date, and sub_account_filter fields as POST /alerts, plus an interval of hours, days, or weeks. The default is days.
The response maps the start of each period to the number of alerts in it. Periods start at start_date, so start your range at midnight UTC if you want calendar days:

Worked example

The sender report example requests a sender’s alerts alongside their sender profile and prints both together.

Next steps