With this API you can manage devices, services, addresses and preferences, as well as send push notifications on our Push notification platform Certa.
Synchronous push
https://push-cm.certa.io/push/v2/{service}/sync/push
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service for which you want to send a synchronous push message. | |
body | body | true |
|
http status | description |
---|---|
200 | |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/sync/push -X POST -H "Content-Type: application/json" -d "{ 'message' : { 'body' : 'string' }, 'criteria' : 'string' }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'data' => json_encode(array( "message": array( "body" => "string" ), "criteria" => "string" ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/sync/push'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Asynchronous push
https://push-cm.certa.io/push/v2/{service}/async/push
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service for which you want to send a synchronous push message. | |
body | body | true |
|
http status | description |
---|---|
200 | |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/async/push -X POST -H "Content-Type: application/json" -d "{ 'message' : { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, 'criteria' : 'string', 'callbackUrl' : 'string', 'androidMessage' : { 'type' : 'object', 'title' : 'Android GCM Message', 'description' : 'Android specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'collapseKey' : 'string', 'compatible' : 'string', 'delayWhileIdle' : { 'type' : 'boolean', 'description' : 'When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.', 'example' : true }, 'restrictedPackageName' : 'string', 'tag' : 'string', 'color' : 'string' } } ] }, 'iosMessage' : { 'type' : 'object', 'title' : 'APNS Message', 'description' : 'APNS specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'launchImage' : 'string', 'actionLocKey' : 'string' } } ] }, 'osxMessage' : { 'type' : 'object', 'title' : 'APNS Message', 'description' : 'APNS specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'launchImage' : 'string', 'actionLocKey' : 'string' } } ] }, 'safariMessage' : { 'type' : 'object', 'title' : 'APNS Message', 'description' : 'APNS specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'launchImage' : 'string', 'actionLocKey' : 'string' } } ] }, 'windows80Message' : { 'type' : 'object', 'title' : 'Windows 8.0 Message', 'description' : 'Windows 8.0 specific push setttings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'navigateURI' : 'string', 'toast' : { 'visual' : { 'addImageQuery' : { 'description' : 'Set to true to allow Windows to append a query string to the image URI supplied in the tile notification.', 'type' : 'boolean', 'example' : true }, 'baseUri' : 'string', 'branding' : 'string', 'contentId' : 'string', 'lang' : 'string', 'version' : { 'description' : 'The version of the tile XML schema this particular payload was developed for.', 'type' : 'number', 'format' : 'double', 'example' : 1 } }, 'audio' : { 'loop' : { 'description' : 'Set to true if the sound should repeat as long as the toast is shown', 'type' : 'boolean', 'example' : true }, 'silent' : { 'description' : 'True to mute the sound; false to allow the toast notification sound to play.', 'type' : 'boolean', 'example' : true }, 'src' : 'string' }, 'actions' : { 'command' : { 'id' : 'string', 'arguments' : 'string' }, 'scenario' : 'string' } }, 'tile' : { 'visual' : { 'addImageQuery' : { 'description' : 'Set to true to allow Windows to append a query string to the image URI supplied in the tile notification.', 'type' : 'boolean', 'example' : true }, 'baseUri' : 'string', 'branding' : 'string', 'contentId' : 'string', 'lang' : 'string', 'version' : { 'description' : 'The version of the tile XML schema this particular payload was developed for.', 'type' : 'number', 'format' : 'double', 'example' : 1 } } }, 'windowsBadge' : { 'value' : 'string', 'version' : { 'description' : 'The version of the badge XML schema this particular payload was developed for.', 'type' : 'number', 'format' : 'double', 'example' : 1 } }, 'notificationType' : 'string' } } ] }, 'wp80Message' : { 'type' : 'object', 'title' : 'Windows Phone 8.0 Message', 'description' : 'Windows Phone 8.0 specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'navigateURI' : 'string', 'cycleTile' : { 'id' : 'string', 'count' : 'integer', 'countAction' : 'string', 'cycleImageActions' : 'string', 'cycleImages' : 'string', 'smallBackgroundImage' : 'string', 'smallBackgroundImageAction' : 'string', 'title' : 'string', 'titleAction' : 'string', 'version' : 'string' }, 'flipTile' : { 'properties' : { 'backBackgroundImage' : 'string', 'backBackgroundImageAction' : 'string', 'backContent' : 'string', 'backContentAction' : 'string', 'backgroundImage' : 'string', 'backgroundImageAction' : 'string', 'backTitle' : 'string', 'backTitleAction' : 'string', 'count' : 'integer', 'countAction' : 'string', 'smallBackgroundImage' : 'string', 'smallBackgroundImageAction' : 'string', 'wideBackBackgroundImage' : 'string', 'wideBackBackgroundImageAction' : 'string', 'wideBackContent' : 'string', 'wideBackContentAction' : 'string', 'wideBackgroundImage' : 'string', 'wideBackgroundImageAction' : 'string' } }, 'iconicTile' : { 'id' : 'string', 'backgroundColor' : 'string', 'backgroundColorAction' : 'string', 'count' : 'integer', 'countAction' : 'string', 'iconImage' : 'string', 'iconImageAction' : 'string', 'smallIconImage' : 'string', 'smallIconImageAction' : 'string', 'title' : 'string', 'titleAction' : 'string', 'wideContent1' : 'string', 'wideContent1Action' : 'string', 'wideContent2' : 'string', 'wideContent2Action' : 'string', 'wideContent3' : 'string', 'wideContent3Action' : 'string' }, 'toast' : { 'navigateUri' : 'string', 'param' : 'string', 'silent' : { 'description' : 'if true no notification sound is heard', 'type' : 'boolean', 'example' : true }, 'sound' : 'string', 'text1' : 'string', 'text2' : 'string' } } } ] }, 'wp81Message' : { 'type' : 'object', 'title' : 'Windows Phone 8.1 Message', 'description' : 'Windows Phone 8.1 specific push settings', 'allOf' : [ { 'badge' : 'string', 'body' : 'string', 'clickAction' : 'string', 'contentAvailable' : { 'type' : 'boolean', 'description' : '(iOS) When set to true the notification act as an 'silent' notification.', 'example' : false }, 'customPayload' : 'string', 'icon' : 'string', 'locArgs' : 'string', 'locKey' : 'string', 'priority' : 'string', 'simulation' : { 'type' : 'boolean', 'description' : '(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.', 'example' : true }, 'sound' : 'string', 'timeToLive' : 'integer', 'title' : 'string', 'titleLocArgs' : 'string', 'titleLocKey' : 'string', 'urlArgs' : 'string' }, { 'properties' : { 'navigateURI' : 'string', 'wp81Toast' : { 'visual' : { 'addImageQuery' : { 'description' : 'Set to 'true' to allow Windows to append a query string to the image URI supplied in the toast notification.', 'type' : 'boolean', 'example' : true }, 'baseUri' : 'string', 'binding' : { 'addImageQuery' : { 'description' : 'Set to 'true' to allow Windows to append a query string to the image URI supplied in the toast notification.', 'type' : 'boolean', 'example' : 'image2.png' }, 'baseUri' : 'string', 'fallback' : 'string', 'lang' : 'string', 'template' : 'string' }, 'contentId' : 'string', 'lang' : 'string', 'version' : { 'description' : 'version number of the visual part of the tile', 'type' : 'number', 'format' : 'double', 'example' : 1 } }, 'audio' : { 'src' : 'string', 'loop' : { 'description' : 'Set to true if the sound should repeat as long as the toast is shown', 'type' : 'boolean', 'example' : true }, 'silent' : { 'description' : 'True to mute the sound; false to allow the toast notification sound to play.', 'type' : 'boolean', 'example' : false } }, 'actions' : { 'scenario' : 'string', 'command' : { 'id' : 'string', 'arguments' : 'string' } } }, 'wp81Tile' : { 'visual' : { 'addImageQuery' : { 'description' : 'Set to 'true' to allow Windows to append a query string to the image URI supplied in the toast notification.', 'type' : 'boolean', 'example' : true }, 'baseUri' : 'string', 'binding' : { 'addImageQuery' : { 'description' : 'Set to 'true' to allow Windows to append a query string to the image URI supplied in the toast notification.', 'type' : 'boolean', 'example' : 'image2.png' }, 'baseUri' : 'string', 'fallback' : 'string', 'lang' : 'string', 'template' : 'string' }, 'contentId' : 'string', 'lang' : 'string', 'version' : { 'description' : 'version number of the visual part of the tile', 'type' : 'number', 'format' : 'double', 'example' : 1 } } }, 'wp81Badge' : { 'version' : { 'description' : 'number of the notification', 'type' : 'number', 'format' : 'double', 'example' : 1 }, 'value' : 'string' } } } ] } }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'data' => json_encode(array( "message": array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), "criteria" => "string", "callbackUrl" => "string", "androidMessage": array( "type" => "object", "title" => "Android GCM Message", "description" => "Android specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "collapseKey" => "string", "compatible" => "string", "delayWhileIdle": array( "type" => "boolean", "description" => "When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.", "example": true ), "restrictedPackageName" => "string", "tag" => "string", "color" => "string" ) ) ] ), "iosMessage": array( "type" => "object", "title" => "APNS Message", "description" => "APNS specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "launchImage" => "string", "actionLocKey" => "string" ) ) ] ), "osxMessage": array( "type" => "object", "title" => "APNS Message", "description" => "APNS specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "launchImage" => "string", "actionLocKey" => "string" ) ) ] ), "safariMessage": array( "type" => "object", "title" => "APNS Message", "description" => "APNS specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "launchImage" => "string", "actionLocKey" => "string" ) ) ] ), "windows80Message": array( "type" => "object", "title" => "Windows 8.0 Message", "description" => "Windows 8.0 specific push setttings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "navigateURI" => "string", "toast": array( "visual": array( "addImageQuery": array( "description" => "Set to true to allow Windows to append a query string to the image URI supplied in the tile notification.", "type" => "boolean", "example": true ), "baseUri" => "string", "branding" => "string", "contentId" => "string", "lang" => "string", "version": array( "description" => "The version of the tile XML schema this particular payload was developed for.", "type" => "number", "format" => "double", "example": 1 ) ), "audio": array( "loop": array( "description" => "Set to true if the sound should repeat as long as the toast is shown", "type" => "boolean", "example": true ), "silent": array( "description" => "True to mute the sound; false to allow the toast notification sound to play.", "type" => "boolean", "example": true ), "src" => "string" ), "actions": array( "command": array( "id" => "string", "arguments" => "string" ), "scenario" => "string" ) ), "tile": array( "visual": array( "addImageQuery": array( "description" => "Set to true to allow Windows to append a query string to the image URI supplied in the tile notification.", "type" => "boolean", "example": true ), "baseUri" => "string", "branding" => "string", "contentId" => "string", "lang" => "string", "version": array( "description" => "The version of the tile XML schema this particular payload was developed for.", "type" => "number", "format" => "double", "example": 1 ) ) ), "windowsBadge": array( "value" => "string", "version": array( "description" => "The version of the badge XML schema this particular payload was developed for.", "type" => "number", "format" => "double", "example": 1 ) ), "notificationType" => "string" ) ) ] ), "wp80Message": array( "type" => "object", "title" => "Windows Phone 8.0 Message", "description" => "Windows Phone 8.0 specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "navigateURI" => "string", "cycleTile": array( "id" => "string", "count" => "integer", "countAction" => "string", "cycleImageActions" => "string", "cycleImages" => "string", "smallBackgroundImage" => "string", "smallBackgroundImageAction" => "string", "title" => "string", "titleAction" => "string", "version" => "string" ), "flipTile": array( "properties": array( "backBackgroundImage" => "string", "backBackgroundImageAction" => "string", "backContent" => "string", "backContentAction" => "string", "backgroundImage" => "string", "backgroundImageAction" => "string", "backTitle" => "string", "backTitleAction" => "string", "count" => "integer", "countAction" => "string", "smallBackgroundImage" => "string", "smallBackgroundImageAction" => "string", "wideBackBackgroundImage" => "string", "wideBackBackgroundImageAction" => "string", "wideBackContent" => "string", "wideBackContentAction" => "string", "wideBackgroundImage" => "string", "wideBackgroundImageAction" => "string" ) ), "iconicTile": array( "id" => "string", "backgroundColor" => "string", "backgroundColorAction" => "string", "count" => "integer", "countAction" => "string", "iconImage" => "string", "iconImageAction" => "string", "smallIconImage" => "string", "smallIconImageAction" => "string", "title" => "string", "titleAction" => "string", "wideContent1" => "string", "wideContent1Action" => "string", "wideContent2" => "string", "wideContent2Action" => "string", "wideContent3" => "string", "wideContent3Action" => "string" ), "toast": array( "navigateUri" => "string", "param" => "string", "silent": array( "description" => "if true no notification sound is heard", "type" => "boolean", "example": true ), "sound" => "string", "text1" => "string", "text2" => "string" ) ) ) ] ), "wp81Message": array( "type" => "object", "title" => "Windows Phone 8.1 Message", "description" => "Windows Phone 8.1 specific push settings", "allOf": [ array( "badge" => "string", "body" => "string", "clickAction" => "string", "contentAvailable": array( "type" => "boolean", "description" => "(iOS) When set to true the notification act as an 'silent' notification.", "example": false ), "customPayload" => "string", "icon" => "string", "locArgs" => "string", "locKey" => "string", "priority" => "string", "simulation": array( "type" => "boolean", "description" => "(Android, GCM) With this feature so you can test the correctness of your message request without actually sending the message.", "example": true ), "sound" => "string", "timeToLive" => "integer", "title" => "string", "titleLocArgs" => "string", "titleLocKey" => "string", "urlArgs" => "string" ), array( "properties": array( "navigateURI" => "string", "wp81Toast": array( "visual": array( "addImageQuery": array( "description" => "Set to "true" to allow Windows to append a query string to the image URI supplied in the toast notification.", "type" => "boolean", "example": true ), "baseUri" => "string", "binding": array( "addImageQuery": array( "description" => "Set to "true" to allow Windows to append a query string to the image URI supplied in the toast notification.", "type" => "boolean", "example" => "image2.png" ), "baseUri" => "string", "fallback" => "string", "lang" => "string", "template" => "string" ), "contentId" => "string", "lang" => "string", "version": array( "description" => "version number of the visual part of the tile", "type" => "number", "format" => "double", "example": 1 ) ), "audio": array( "src" => "string", "loop": array( "description" => "Set to true if the sound should repeat as long as the toast is shown", "type" => "boolean", "example": true ), "silent": array( "description" => "True to mute the sound; false to allow the toast notification sound to play.", "type" => "boolean", "example": false ) ), "actions": array( "scenario" => "string", "command": array( "id" => "string", "arguments" => "string" ) ) ), "wp81Tile": array( "visual": array( "addImageQuery": array( "description" => "Set to "true" to allow Windows to append a query string to the image URI supplied in the toast notification.", "type" => "boolean", "example": true ), "baseUri" => "string", "binding": array( "addImageQuery": array( "description" => "Set to "true" to allow Windows to append a query string to the image URI supplied in the toast notification.", "type" => "boolean", "example" => "image2.png" ), "baseUri" => "string", "fallback" => "string", "lang" => "string", "template" => "string" ), "contentId" => "string", "lang" => "string", "version": array( "description" => "version number of the visual part of the tile", "type" => "number", "format" => "double", "example": 1 ) ) ), "wp81Badge": array( "version": array( "description" => "number of the notification", "type" => "number", "format" => "double", "example": 1 ), "value" => "string" ) ) ) ] ) ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/async/push'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Asynchronous status
https://push-cm.certa.io/push/v2/{service}/async/status/{batchId}
name | in | required | type | description |
---|---|---|---|---|
service | path | true | string | The name of the service for which you want to retrieve the push status information. |
batchId | path | true | string | The batchId received in the response of the push call. |
http status | description |
---|---|
200 | |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/async/status/{batchId} -X GET -H "Content-Type: application/json"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'batchId' => 'batchId' ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/async/status/' .$batchId; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Synchronous query
https://push-cm.certa.io/push/v2/{service}/sync/query
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service to query | |
body | body | true |
|
http status | description |
---|---|
200 | The response will only contain results for the platforms configured for the service. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/sync/query -X POST -H "Content-Type: application/json" -d "{ 'criteria' : 'string' }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'data' => json_encode(array( "criteria" => "string" ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/sync/query'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Validate criteria
https://push-cm.certa.io/push/v2/{service}/criteria/validate
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service to query | |
body | body | true |
|
http status | description |
---|---|
200 | The specified criteria string is valid. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. | | 500 | The request could not be fulfilled because of an unknown error. |
curl -i https://push-cm.certa.io/push/v2/{service}/criteria/validate -X POST -H "Content-Type: application/json" -d "{ 'criteria' : 'string' }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'data' => json_encode(array( "criteria" => "string" ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/criteria/validate'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Wipe device
https://push-cm.certa.io/push/v2/{service}/wipe/{deviceid}
name | in | required | type | description |
---|---|---|---|---|
service | path | true | string | The name of the service for which you want to remove the device |
deviceid | path | true | string | Unique identifier of the device |
http status | description |
---|---|
200 | The server successfully processed the request. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. | | 500 | The request could not be fulfilled because of an unknown error. |
curl -i https://push-cm.certa.io/push/v2/{service}/wipe/{deviceid} -X DELETE -H "Content-Type: application/json"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'deviceid' => 'deviceid' ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/wipe/' .$deviceid; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Register address
https://push-cm.certa.io/push/v2/{service}/address/{platform}/{deviceid}
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service for which you want the address to be registered. | |
platform | path | true | string | The platform for which the address should be registered. | |
deviceid | path | true | string | Unique identifier of the device. | |
body | body | true |
|
http status | description |
---|---|
200 | The specified device has been unregistered. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/address/{platform}/{deviceid} -X PUT -H "Content-Type: application/json" -d "{ 'token' : 'string' }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'platform' => 'platform', 'deviceid' => 'deviceid', 'data' => json_encode(array( "token" => "string" ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/address/' .$platform .'/' .$deviceid; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Unregister address
https://push-cm.certa.io/push/v2/{service}/address/{platform}/{deviceid}
name | in | required | type | description |
---|---|---|---|---|
service | path | true | string | The name of the service for which you want the address to be unregistered. |
platform | path | true | string | The platform for which the address should be unregistered. |
deviceid | path | true | string | Unique identifier of the device. |
http status | description |
---|---|
200 | The specified device has been unregistered. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/address/{platform}/{deviceid} -X DELETE -H "Content-Type: application/json"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'platform' => 'platform', 'deviceid' => 'deviceid' ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/address/' .$platform .'/' .$deviceid; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Register preference
https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}/{prefName}
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service for which you want to register the preference. | |
deviceid | path | true | string | Unique identifier of the device | |
prefName | path | true | string | The name of the preference | |
body | body | true |
|
http status | description |
---|---|
200 | The specified preference has been registered. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}/{prefName} -X PUT -H "Content-Type: application/json" -d "{ 'type' : 'string', 'value' : 'string' }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'deviceid' => 'deviceid', 'prefName' => 'prefName', 'data' => json_encode(array( "type" => "string", "value" => "string" ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/preference/' .$deviceid .'/' .$prefName; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Unregister preference
https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}/{prefName}
name | in | required | type | description |
---|---|---|---|---|
service | path | true | string | The name of the service for which you want to unregister the preference. |
deviceid | path | true | string | Unique identifier of the device |
prefName | path | true | string | The name of the preference |
http status | description |
---|---|
200 | The specified preference has been unregistered. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}/{prefName} -X DELETE -H "Content-Type: application/json"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'deviceid' => 'deviceid', 'prefName' => 'prefName' ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/preference/' .$deviceid .'/' .$prefName; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Get preferences
https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}
name | in | required | type | description |
---|---|---|---|---|
service | path | true | string | The name of the service for which you want to get preferences. |
deviceid | path | true | string | Unique identifier of the device. |
http status | description |
---|---|
200 | |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/preference/{deviceid} -X GET -H "Content-Type: application/json"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'deviceid' => 'deviceid' ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/preference/' .$deviceid; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>
Register preferences
https://push-cm.certa.io/push/v2/{service}/preference/{deviceid}
name | in | required | type | description | schema |
---|---|---|---|---|---|
service | path | true | string | The name of the service for which you want to register preferences. | |
deviceid | path | true | string | Unique identifier of the device. | |
body | body | true |
|
http status | description |
---|---|
200 | The specified preferences have been registered. |
400 | The request was improperly formatted or the request body was empty. |
401 | The user is not authenticated to use this feature. |
403 | The authenticated user is not allowed to use this feature or the user was blocked from performing this request |
from the current location. | | 404 | The referenced object, for example 'service' does not exist. |
curl -i https://push-cm.certa.io/push/v2/{service}/preference/{deviceid} -X PUT -H "Content-Type: application/json" -d "{ 'preferences' : { 'type' : 'object', 'properties' : { 'type' : 'string', 'name' : 'string', 'value' : 'string' }, 'required' : [ 'type', 'name', 'value' ] } }"
<?php // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required $parameters = array( 'service' => 'service', 'deviceid' => 'deviceid', 'data' => json_encode(array( "preferences": array( "type" => "object", "properties": array( "type" => "string", "name" => "string", "value" => "string" ), "required": [ "type", "name", "value" ] ) ) ) ); $url = 'https://push-cm.certa.io/push/v2/' .$service .'/preference/' .$deviceid; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_HEADER => TRUE, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true ) ); $result = curl_exec($ch); $HeaderInfo = curl_getinfo($ch); $HeaderSize=$HeaderInfo['header_size']; $Body = trim(mb_substr($result, $HeaderSize)); $ResponseHeader = explode('n',trim(mb_substr($result, 0, $HeaderSize))); unset($ResponseHeader[0]); $Headers = array(); foreach($ResponseHeader as $line){ list($key,$val) = explode(':',$line,2); $Headers[strtolower($key)] = trim($val); } var_dump( array( 'Body' => $Body, 'Headers' => $Headers )); ?>