//-- Intent: Update pager message with pagercode of 100000 --//


var jsonString = ' \
{ \
	"PageCode":100000,	\
    "Name":"API Pagg5g5ger", \
	"Description":"created by api us5gh5ger", \
	"From":"SwiftAPI", \
	"DefaultSpokenLanguage":"English", \
	"Body": \
		[{ \
			"SpokenLanguage":"English", \
			"Subject":"my subject", \
			"Body": \
				[{ \
					"$type":"SwiftReach.Swift911.Core.Messages.Pager.PAGER_TEXT_SOURCE_TEXT, SwiftReach.Swift911.Core", \
					"Text":"this is the body of my message", \
					"TextType":"pager_text_source_text" \
				}] \
		}], \
	"Visibility":"Visible", \
	"DeleteLocked":false \
}';

$.ajax({
  type: "PUT",
  contentType: "application/json; charset=utf-8",
  headers: {"SwiftAPI-Key": "12345"},
  url: "http://api.v4.swiftreach.com/api/Messages/Pager/Update/100000",
  data: jsonString,
  dataType: "json"
  success: function(result) {
        // Do something with the result
    }

});

<!-- example return value -->
0