//-- Intent: send the emailmessage with emailcode of 100000 to --//
//-- an array of contacts posted in the body of the request --//
//-- and name the alert "My Test Alert" --//


var jsonString = ' \
[{ \
	"EntityName":"Sample Test", \
	"EntityGuid":"952a9bb6-ceac-4f15-9678-ec4e52f564a1", \
        "Email":"test1@swiftreach.com" \
},{ \
	"EntityName":"Sample Test", \
	"EntityGuid":"952a9bb6-ceac-4f15-9678-ec4e52f564a1", \
        "Email":"test2@swiftreach.org" \
}]';

$.ajax({
  type: "POST",
  contentType: "application/json; charset=utf-8",
  headers: {"SwiftAPI-Key": "12345"},
  url: "http://api.v4.swiftreach.com/api/Messages/Email/Send/MY%20Test%20Alert/100000",
  data: jsonString,
  dataType: "json"
  success: function(result) {
        // Do something with the result
    }

});

<!-- example return value -->
123456