Skip to content

SendMessageWithPriorityExtended

Sends an SMS message to the given phone number. Queue priority is set based on Priority parameter.


Priority:

0 - Lowest priority

1 - Low priority

2 - Medium priority

3 - High priority


Messages with a higher priority will be preferred over your normal messages.



const HighPriority = 1;
const NormalPriority = 2;
const LowPriority = 3;
// uses JQuery library
var postUrl =
'https://secure.smsgateway.ca/services/message.svc/' +
accountKey +
'/' +
destinationNumber +
'/PriorityExtended/' +
NormalPriority;
var body = JSON.stringify({
MessageBody: 'Message Body',
Reference: 'Reference Number',
});
$.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/PriorityExtended/:priority

ParameterRequiredLocation
AccountKeyYour Swift SMS Gateway account keyURL
DestinationNumberCell number to receive the text messageURL
PriorityPriority of message. 1 = High 2 = Normal 3 = LowURL
MessageBodyBody of the message to sendBODY
ReferenceInternal Reference IDBODY

Returns

SMSSendMessageResponse

See (SendMessageExtended) for more details.