Skip to content

SendMessageViaDedicatedNumber

Sends an SMS message to the given phone number from the specified sender number. The SenderNumber must be a dedicated long code associated with your account. View your dedicated numbers in your control panel.

// uses JQuery library
var postUrl =
'https://secure.smsgateway.ca/services/message.svc/' +
accountKey +
'/' +
destinationNumber +
'/ViaDedicated';
var body = JSON.stringify({
MessageBody: 'Message Body',
Reference: 'Reference Number',
SenderNumber: '[senderNumber]',
});
$.ajax({
url: postUrl,
method: 'POST',
contentType: 'application/json;charset=UTF-8',
data: body,
})
.done(function (response) {
alert(response);
})
.error(function (xhr, textStatus, errorThrown) {
alert(xhr.responseText);
});

HTTP Request


POST:

/services/message.svc/:accountKey/:destinationNumber/ViaDedicated

ParameterRequiredLocation
AccountKeyYour Swift SMS Gateway account keyURL
DestinationNumberCell number to receive the text messageURL
MessageBodyBody of the message to sendBODY
ReferenceInternal Reference IDBODY
SenderNumberSender ID (Long code number) to send the message viaBODY

Returns

string

See (SendMessage)