Use SMS Alert Channels to send SMS notifications to phone numbers when checks fail or recover. SMS alerts are ideal for critical alerts that require immediate attention.
import { SmsAlertChannel } from 'checkly/constructs'const smsChannel = new SmsAlertChannel("sms-channel-1", { phoneNumber: "+1234567890",})
const opsSms = new SmsAlertChannel("ops-sms", { phoneNumber: "+1234567890", sendRecovery: true, // Get notified when issues are resolved sendFailure: true,})
Use cases: Recovery confirmation, operational awareness, noise reduction.
The phone numbers used for SMS alerting need to be in E.164 format 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
Correct Format
Incorrect Format
// US numbersconst usPhone = new SmsAlertChannel('us-sms', { phoneNumber: '+15551234567' // +1 (country code) + area code + number})// UK numbersconst ukPhone = new SmsAlertChannel('uk-sms', { phoneNumber: '+447911123456' // +44 (country code) + mobile number})// German numbersconst dePhone = new SmsAlertChannel('de-sms', { phoneNumber: '+491701234567' // +49 (country code) + mobile number})
// ❌ Don't use these formats:// Missing country codephoneNumber: '5551234567'// With spaces or dashesphoneNumber: '+1 555-123-4567'// With parenthesesphoneNumber: '+1 (555) 123-4567'// Domestic formatphoneNumber: '(555) 123-4567'
SMS Limits: Be mindful of SMS costs and potential rate limits. Use SMS for truly critical alerts and combine with other notification methods for comprehensive coverage.
Critical Alerts Only
Escalation Pattern
import { ApiCheck, SmsAlertChannel } from "checkly/constructs"// Use SMS sparingly for the most critical alertsconst emergencySms = new SmsAlertChannel("emergency-sms", { phoneNumber: "+1555EMERGENCY", sendFailure: true, sendRecovery: false, // Reduce SMS volume sendDegraded: false, // Only failures})new ApiCheck("life-critical-system", { name: "Life Critical System", alertChannels: [emergencySms], tags: ["life-critical", "emergency"], request: { method: "GET", url: "https://life-critical.example.com/health", },})
import { ApiCheck, EmailAlertChannel, SmsAlertChannel,} from "checkly/constructs"// Start with less intrusive methods, escalate to SMSconst teamEmail = new EmailAlertChannel("team-email", { address: "team@example.com",})const urgentSms = new SmsAlertChannel("urgent-sms", { phoneNumber: "+1555URGENT",})// Regular monitoring with emailnew ApiCheck("regular-service", { name: "Regular Service", alertChannels: [teamEmail], request: { method: "GET", url: "https://api.example.com/regular", },})// Critical service with SMS escalationnew ApiCheck("critical-service", { name: "Critical Service", alertChannels: [teamEmail, urgentSms], // Both email and SMS request: { method: "GET", url: "https://api.example.com/critical", },})