Learn more about Email alerts in the email alert documentation.
Use Email Alert Channels to send email notifications when checks fail or recover.
import { EmailAlertChannel } from "checkly/constructs"

const emailChannel = new EmailAlertChannel("email-channel-1", {
  address: "alerts@acme.com",
})

Configuration

Configure Email-specific settings:
ParameterTypeRequiredDefaultDescription
addressstring-Email address to send notifications to

Email Alert Channel Options

address
string
required
Email address to send notifications to. Each EmailAlertChannel supports only one email address.Usage:
new EmailAlertChannel('team-email', {
  address: 'dev-team@acme.com'
})
Examples:
const teamEmail = new EmailAlertChannel("team-email", {
  address: "dev-team@acme.com",
})

new ApiCheck("api-health-check", {
  name: "API Health Check",
  alertChannels: [teamEmail],
  request: {
    method: "GET",
    url: "https://api.acme.com/health",
  },
})
Use cases: Team notifications, individual alerts, distribution lists, role-based alerting.

General Alert Channel Options

sendRecovery
boolean
Whether to send notifications when checks recover from failure or degraded state.Usage:
new EmailAlertChannel("recovery-email", {
  address: "ops@acme.com",
  sendRecovery: true, // Send recovery notifications
})
Examples:
const opsEmail = new EmailAlertChannel("ops-email", {
  address: "ops@acme.com",
  sendRecovery: true, // Get notified when issues are resolved
  sendFailure: true,
})
Use cases: Recovery confirmation, operational awareness, noise reduction.
sendFailure
boolean
Whether to send notifications when checks fail.Usage:
new EmailAlertChannel("failure-email", {
  address: "oncall@acme.com",
  sendFailure: true, // Send failure notifications
})
Examples:
const criticalEmail = new EmailAlertChannel("critical-email", {
  address: "oncall@acme.com",
  sendFailure: true,
  sendRecovery: false,
  sendDegraded: false,
})
Use cases: Incident response, failure monitoring, operational alerting.
sendDegraded
boolean
Whether to send notifications when API checks degrade (performance thresholds exceeded but not failed).Usage:
new EmailAlertChannel("performance-email", {
  address: "performance-team@acme.com",
  sendDegraded: true, // Send degraded performance notifications
})
Use cases: Performance monitoring, early warning systems, SLA tracking.
sslExpiry
boolean
Whether to send notifications for SSL certificate expiry warnings.Usage:
new EmailAlertChannel("security-email", {
  address: "security@acme.com",
  sslExpiry: true,
  sslExpiryThreshold: 30, // Alert 30 days before expiry
})
Use cases: Certificate management, security compliance, proactive maintenance.
sslExpiryThreshold
number
Number of days before SSL certificate expiry to send notifications. Only relevant when sslExpiry is enabled.Usage:
new EmailAlertChannel("ssl-monitoring", {
  address: "devops@acme.com",
  sslExpiry: true,
  sslExpiryThreshold: 30, // Alert 30 days before expiry
})
Use cases: Certificate renewal planning, compliance management, operational scheduling.

Examples

// Create separate channels for different recipients
const devEmail = new EmailAlertChannel("dev-email", {
  address: "dev@acme.com",
  sendDegraded: true,
})

const opsEmail = new EmailAlertChannel("ops-email", {
  address: "ops@acme.com",
  sendFailure: true,
  sendRecovery: true,
})

const managerEmail = new EmailAlertChannel("manager-email", {
  address: "manager@acme.com",
  sendFailure: true,
  sendRecovery: false,
})

new ApiCheck("important-service", {
  name: "Important Service Check",
  alertChannels: [devEmail, opsEmail, managerEmail],
  request: {
    method: "GET",
    url: "https://api.acme.com/important",
  },
})
Single Email Address: EmailAlertChannel only accepts one email address. For multiple recipients, create separate EmailAlertChannel instances or use distribution lists.
Email Delivery: Email notifications may be subject to spam filters or delivery delays. For critical alerts, consider combining email with other notification methods like SMS or Slack.

Reference an alert channel by ID

If your Checkly account includes alert channels that are not controlled via Checkly constructs, find the email channel ID in the Checkly web UI or via the API and set it using EmailAlertChannel.fromId().
  1. Go to Alert Channels in your Checkly dashboard
  2. Find your email channel and note the ID in the URL or channel details
Using Existing Channel
// Reference an existing email channel by ID
const existingEmailChannel = EmailAlertChannel.fromId(123)

new ApiCheck("existing-channel-check", {
  name: "Check with Existing Channel",
  alertChannels: [existingEmailChannel],
  request: {
    method: "GET",
    url: "https://api.acme.com/endpoint",
  },
})