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.

Query Parameters

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

Response

json
{
  "data": [
    {
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "domainId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
      "domainName": "example.com",
      "type": "score_change",
      "severity": "warning",
      "title": "Security score decreased",
      "message": "The security score for example.com dropped from 85 to 72",
      "metadata": {
        "previousScore": 85,
        "newScore": 72
      },
      "read": false,
      "createdAt": "2024-01-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 20,
      "hasMore": false
    }
  }
}

Alert Types

TypeDescription
score_changeDomain security score changed significantly
score_thresholdScore dropped below configured threshold
dns_changeDNS record change detected
report_failureDMARC report showed authentication failures
new_reportNew DMARC or TLS report received

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
401unauthorizedMissing or invalid API token
404not_foundDomain not found (when filtering by domainId)
429rate_limitedToo many requests

Monitor and secure your email domains.