<!-- Intent: send the pager message with pagercode of 100000 to an array of contacts posted in the body of the request and name the alert "My Test Alert" --> <?php $url = 'http://api.v4.swiftreach.com/api/Messages/Pager/Send/MY%20Test%20Alert/100000'; $authToken = '123456'; $jsonString = ' [{ "EntityName":"Sample One", "EntityGuid":"a44667cf-e4e5-4f28-b4e2-948ba2065c09", "Pager":"5551234567", "SMSNetwork":"0", "PagerNetwork":"1" },{ "EntityName":"Sample Two", "EntityGuid":"a44667cf-e4e5-4f28-b4e2-948ba2065c09", "Pager":"5551234567", "SMSNetwork":"0", "PagerNetwork":"7" }]'; $headers = array( 'Content-type: application/json', 'SwiftAPI-Key: ' . $authToken, 'Accept: application/json', 'Expect:' ); $ch = curl_init(); $args = array( CURLOPT_URL => $url, CURLOPT_FOLLOWLOCATION => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $jsonString, CURLOPT_HTTPHEADER => $headers, ); curl_setopt_array($ch, $args); $res = curl_exec($ch); $res_data = json_decode($res, true); print($res_data); ?> <!-- example return value --> 123456