Skip to main content

Setup

You will need a Sinch account with a Service Plan ID, API token, and a from number. In Courier, navigate to the Sinch Integration page, enter your Service Plan ID, API token, and from number, then click “Save.”

Profile Requirements

To deliver an SMS message through Sinch, Courier must be provided the recipient’s SMS-compatible phone number. This value should be included in the recipient profile as phone_number.
{
  "message": {
    "to": {
      "phone_number": "+12025550156"
    }
  }
}

Overrides

Overrides can be used to change the request body and config that Courier uses to send a message through Sinch. You can override the apiToken, servicePlanId, and url via config, and any of the message body fields via body.
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "phone_number": "+12345678901"
    },
    "providers": {
      "sinch": {
        "override": {
          "body": {
            "from": "+15555555555"
          },
          "config": {
            "apiToken": "<override API token>",
            "servicePlanId": "<override Service Plan ID>",
            "url": "<alternate API url>"
          }
        }
      }
    }
  }
}
Everything inside of message.providers.sinch.override will replace what Courier sends to the Sinch SMS API.