Learn more about Phone Call alerts in the Phone Call Alerts documentation.
Use Phone Call Alerts to make voice calls when checks fail or recover. Phone call alerts are the most immediate form of notification, ideal for critical systems requiring instant attention.
import { PhoneCallAlertChannel } from "checkly/constructs"

const callChannel = new PhoneCallAlertChannel("call-channel-1", {
  phoneNumber: "+1234567890",
  name: "Tim's phone",
})

Configuration

Configure phone call-specific settings:
ParameterTypeRequiredDefaultDescription
phoneNumberstring-Phone number in international format (e.g., +1234567890)
namestring-Friendly name for the phone call alert channel (e.g. “Tim’s phone”)

Phone Call Alert Channel Examples

import { PhoneCallAlertChannel, ApiCheck } from "checkly/constructs"

const emergencyCall = new PhoneCallAlertChannel("emergency-response", {
  phoneNumber: "+1555EMERGENCY",
  sendFailure: true,
  sendRecovery: false, // Don't call for recoveries
  sendDegraded: false, // Only complete failures
})

new ApiCheck("life-safety-system", {
  name: "Life Safety System",
  alertChannels: [emergencyCall],
  tags: ["life-safety", "critical"],
  request: {
    method: "GET",
    url: "https://life-safety.example.com/health",
  },
})

Phone Number Format

The phone numbers used for SMS alerting need to be in E.164 format. Stick to the following rules and you’ll be fine:
  • Prepend international access codes with a + sign
  • Do not use any white spaces
  • Use up to 15 characters
// US numbers
const usCall = new PhoneCallAlertChannel('us-call', {
  phoneNumber: '+15551234567' // +1 (country code) + area code + number
})

// UK numbers
const ukCall = new PhoneCallAlertChannel('uk-call', {
  phoneNumber: '+447911123456' // +44 (country code) + mobile number
})

// German numbers
const deCall = new PhoneCallAlertChannel('de-call', {
  phoneNumber: '+491701234567' // +49 (country code) + mobile number
})

// Australian numbers
const auCall = new PhoneCallAlertChannel('au-call', {
  phoneNumber: '+61412345678' // +61 (country code) + mobile number
})

Combining with Other Alert Channels

Phone calls should be used as part of a comprehensive alerting strategy:
import {
  PhoneCallAlertChannel,
  SmsAlertChannel,
  EmailAlertChannel,
  SlackAlertChannel,
  ApiCheck,
} from "checkly/constructs"

// Layered alerting approach
const teamSlack = new SlackAlertChannel("team-slack", {
  url: new URL("https://hooks.slack.com/services/YOUR/WEBHOOK/URL"),
  channel: "#alerts",
})

const oncallEmail = new EmailAlertChannel("oncall-email", {
  address: "oncall@example.com",
})

const oncallSms = new SmsAlertChannel("oncall-sms", {
  phoneNumber: "+1555ONCALL",
})

const emergencyCall = new PhoneCallAlertChannel("emergency-call", {
  phoneNumber: "+1555EMERGENCY",
  sendFailure: true,
  sendRecovery: false, // Only call for failures
})

new ApiCheck("comprehensive-alerting", {
  name: "Critical System with Comprehensive Alerting",
  alertChannels: [
    teamSlack, // Immediate team visibility
    oncallEmail, // Documentation and detail
    oncallSms, // Mobile notification
    emergencyCall, // Immediate voice alert
  ],
  tags: ["critical", "comprehensive"],
  request: {
    method: "GET",
    url: "https://critical.example.com/health",
  },
})

Best Practices

Use Sparingly: Phone calls are the most intrusive form of notification. Reserve them for truly critical systems where immediate human intervention is required.
Recovery Notifications: Consider whether recovery calls are necessary. For some critical systems, knowing when the system recovers is as important as knowing when it fails.