Integrations
SMS
Sinch

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.

Fields marked with an * are required.

API tokenstring*

The API token from Sinch.

Service Plan IDstring*

The Service Plan ID from Sinch.

Sinch regionenum*

The region of your domain. One of AU, BR, CA, EU, US.

Phone numberstring*

The phone number to send messages from. Required when From (under Advanced) is set to Phone number.

Short codestring*

The Sinch short code to send messages from. Required when From (under Advanced) is set to Short code.

Sender IDstring*

The Sinch Sender ID to send messages from. Required when From (under Advanced) is set to Sender ID.

Whether to receive message delivery status updates from Sinch via webhook.

Whether to enable sandbox mode for your Sinch channel.

Whether to enable Knock link-click tracking.


Optional Sinch settings

Fromenum

The method used to send your SMS messages. One of Phone number, Short code, or Sender ID. Optional if you have an automatic originator number on your Sinch account.

When configured, the optional payload overrides set here will apply to all SMS notifications sent from this channel in the configured environment. Learn more about SMS channel overrides here.

Payload overridesJSON (string) | liquid

Provide a JSON object to merge into the API payload that is sent to the downstream provider.

Set optional per-environment conditions for this channel. These conditions are evaluated each time a workflow run encounters a step that uses this channel in the configured environment. If the conditions are not met, the step will be skipped.

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:

  1. Navigate to Channels and sources in your Knock dashboard
  2. Select your Sinch channel
  3. Under Environment configurations, click the environment you want to configure to expand its settings
  4. Turn on Incoming webhook
  5. 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:

Sinch statusKnock statusDescription
DelivereddeliveredThe recipient received the message
FailedbouncedThe message couldn't be delivered
RejectedbouncedThe carrier rejected the message
AbortedbouncedSinch stopped the message before it reached the carrier
DeletedbouncedThe carrier deleted the message, such as for an invalid or opted-out number

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:

  1. Check your payload overrides. Overrides that set delivery_report to none or point callback_url elsewhere stop delivery reports from reaching Knock.
  2. 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.
  3. Check the message's delivery logs. The request to Sinch in the message's delivery logs should include delivery_report and callback_url.
New chat