Skip to content

Alerts ​

Retrieve alerts for your organization's monitored domains.

List Alerts ​

http
GET /api/v1/alerts

Returns a paginated list of alerts for your organization, newest first.

Query Parameters ​

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerResults per page, 1 to 100 (default: 20). Larger values return 100
domainIdstringFilter by domain ID
severitystringFilter by severity: info, warning, or critical
unreadOnlybooleanOnly return unread alerts (default: false)

page and limit must be whole numbers, and severity one of the three values; anything else returns 400.

Response ​

json
{
  "data": [
    {
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "domainId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
      "domainName": "example.com",
      "type": "score_change",
      "severity": "warning",
      "title": "Score dropped for example.com",
      "message": "The security score for example.com dropped from 85 (Good) to 77 (Fair).",
      "metadata": {
        "previousScore": 85,
        "currentScore": 77,
        "scoreDiff": -8,
        "previousRating": "Good",
        "currentRating": "Fair",
        "scoringVersion": 1,
        "changes": [
          {
            "component": "DMARC",
            "previousScore": 25,
            "currentScore": 17,
            "diff": -8,
            "description": "DMARC: 25 → 17 points"
          }
        ]
      },
      "read": false,
      "createdAt": "2024-01-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 20,
      "hasMore": false
    }
  }
}

Alert Types ​

TypeDescription
score_changeThe domain's security score went up or down. metadata has previousScore, currentScore, scoreDiff and the per-component changes
dns_changeA DNS record changed, for example a weaker DMARC policy or a removed record
report_failureDMARC reports show messages failing authentication
tls_failureTLS-RPT reports show failed TLS connections, or a problem with the mail servers' TLS setup
cert_expiryA certificate is expiring soon or has expired

The type field can also hold score_threshold and new_report. They're reserved, and no alerts of these types are sent today.

Severity Levels ​

SeverityDescription
infoInformational, no action required
warningAttention recommended
criticalImmediate action required

Example Request ​

bash
curl -X GET "https://app.mailshield.app/api/v1/alerts?severity=critical&unreadOnly=true" \
  -H "Authorization: Bearer your_api_token"

Example: Filter by Domain ​

bash
curl -X GET "https://app.mailshield.app/api/v1/alerts?domainId=a1b2c3d4-5678-90ab-cdef-1234567890ab" \
  -H "Authorization: Bearer your_api_token"

Error Responses ​

StatusCodeDescription
400validation_errorInvalid page, limit or severity
401unauthorizedMissing or invalid API token
404not_foundDomain not found (when filtering by domainId)
429rate_limitedToo many requests

Monitor and secure your email domains.