How to send SMS messages with Sinch
Configure Sinch credentials, sender settings, and delivery status webhooks in Knock.
Knock integrates with Sinch to send SMS notifications to your recipients.
Features
#- Per environment configuration
- Delivery tracking
- Knock link tracking
- Sandbox mode
Getting started
#You can create a new Sinch channel in the dashboard under the Channels and sources page in your account settings. From there, you'll need to configure the channel for each environment you have.
Channel configuration
#Configure the following settings per environment. Navigate to Channels and sources in your dashboard account settings and select your Sinch channel. Under Environment configurations, click the environment you'd like to configure to expand its settings, then click "Save changes" when you're done. Expand Advanced for additional options, including overrides and conditions.
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, Sinch sends delivery reports directly to Knock, so message statuses update as soon as the carrier reports them, including failures. Without a webhook, Knock polls Sinch for delivery status, and a report that arrives after polling ends won't update the message.
Sinch only sends a delivery report when a message asks for one. With the incoming webhook turned on, Knock requests a final delivery report on every message it sends and points it at the environment's webhook URL, so there's nothing to configure in Sinch.
To enable delivery status webhooks:
- Navigate to Channels and sources in your Knock dashboard
- Select your Sinch channel
- Under Environment configurations, click the environment you want to configure to expand its settings
- Turn on Incoming webhook
- Click "Save changes"
Each environment has its own webhook URL, so turn on the incoming webhook for each environment you want to track.
Supported delivery statuses
#When delivery status webhooks are enabled for Sinch, Knock updates message statuses based on these delivery reports:
Other Sinch statuses, such as Queued, Dispatched, Expired, Cancelled, and Unknown, don't change the message status in Knock. Learn more about the bounced status in the message statuses docs.
Troubleshooting
#If delivery status updates aren't appearing in Knock:
- Check your payload overrides. Overrides that set
delivery_reporttononeor pointcallback_urlelsewhere stop delivery reports from reaching Knock. - Check that the environment has the incoming webhook turned on. Knock only requests delivery reports for messages sent from environments where the setting is on, so messages sent before you turned it on still rely on polling.
- Check the message's delivery logs. The request to Sinch in the message's delivery logs should include
delivery_reportandcallback_url.