Description
Sends an SMS to the provided phone number. It will use a combination of the templateId and personalisation to provide the contents of the SMS.
Parameters
Name | Type | Description |
---|---|---|
templateId | String, required | The ID of the template to use |
phoneNumber | String, required | The phone number the SMS will be sent to |
personalisation | Object, optional | An object containing the different fields to input into the template |
reference | String, optional | An optional reference that can be used to identify an SMS |
senderId | String, optional | Identifies the sender of the SMS |
apiKeyName | String, optional | Specify the name of the API key you want to use. Names and keys are defined in the worker configuration. If not supplied the default will be used |
Example Request
function(params, credentials) {
let result = this.callWorkerMethod("govnotify", "sendSms", {
"templateId": "00000000-0000-0000-0000-000000000000",
"phoneNumber": "07777123456",
"personalisation": {
"firstName": "John",
"lastName": "Smith"
},
"reference": "Reference",
"senderId": "0000-0000"
});
return result;
}
Last modified on August 01, 2023