Skip to main content

Setup

You will need an Azure Communication Services resource with an SMS-capable phone number. In the Azure portal, navigate to your Communication Services resource to get your endpoint URL and access key. In Courier, navigate to the Azure SMS Integration page, enter your access key, endpoint, and from number, then click “Save.”

Profile Requirements

To deliver an SMS message through Azure SMS, 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 that Courier makes to Azure Communication Services. You can override the accessKey, endpoint, and from number via config, as well as the message text and to number via body.
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "phone_number": "+12345678901"
    },
    "providers": {
      "azure-sms": {
        "override": {
          "body": {
            "to": "+10987654321",
            "message": "Override message content"
          },
          "config": {
            "from": "<override from number>",
            "accessKey": "<override access key>",
            "endpoint": "<override endpoint>"
          }
        }
      }
    }
  }
}