How to send SMS messages with Twilio
Get started sending SMS notifications with Twilio and Knock.
Knock integrates with Twilio to send SMS notifications to your recipients.
Features
#- Delivery tracking
- Bounce Support
- Knock link tracking
- Per environment configuration
- Sandbox mode
Getting started
#You can create a new Twilio channel in the dashboard under the Channels and sources page in your account settings. From there, you'll need to take some steps in Twilio before you can configure your Twilio channel within Knock.
Channel configuration
#The following channel settings should be configured per environment. Navigate to Channels and sources in your dashboard account settings, select your Twilio channel, then click "Manage configuration" under the environment that you'd like to configure.
Recipient data requirements
#In order to send an SMS notification you'll need a valid phone_number property set on your recipient.
Delivery status webhooks
#When enabled, Twilio will send delivery status updates directly to Knock via webhooks, allowing you to track the full lifecycle of your SMS messages in real-time.
Prerequisites
#Before enabling delivery status webhooks, you need:
- A Twilio account with an SMS-enabled phone number, short code, or messaging service
- A Twilio channel configured in Knock (see the getting started section above)
- Access to your Twilio phone number or messaging service configuration
Setting up delivery status webhooks
#Supported delivery statuses
#When delivery status webhooks are enabled for Twilio, Knock will update message statuses based on these Twilio status callback events:
Troubleshooting
#If delivery status updates aren't appearing in Knock:
- Check status callback URL. Verify the Status Callback URL is correctly configured in your Twilio phone number or messaging service settings.
- Verify phone number format. Ensure recipients have valid phone numbers in E.164 format (e.g., +1234567890).
- Check trial account limits. If using a trial account, verify the recipient phone number has been verified in Twilio.
- Review Twilio logs. Check the Messaging Logs in Twilio Console to see if messages are being sent and if status callbacks are being triggered.
- Test with a real number. Send a test SMS to a real phone number to verify the full delivery flow.