Updating Push Notifications

Updating Push Notifications

Using the RESTful API, you can change the properties of a push notification if it hasn't been sent to the respective platform's notification server yet. Because push notifications are sent right away after creation, you can modify only notifications that have been scheduled for later delivery.

You can only change a single push notification at a time using its ID.

Assume that you want to change the filter and the message of an existing notification. You can do that using this code snippet:

Request:
    PUT https://api.everlive.com/v1/your-app-id/Push/Notifications/item-id-here  
Headers:
    Authorization  Masterkey your-master-key
    Content-Type application/json  
Body:
    {
        "Filter": "{\"PlatformType\": 2}",
        "Message": "A new message"
    }
Response:
    Status: 200 OK
    Content-Type: application/json
var newProps = {
    "Filter": "{\"PlatformType\": 2}",
    "Message": "A new message"
};

$.ajax({
    type: "PUT",
    url: 'https://api.everlive.com/v1/your-app-id/Push/Notifications/item-id-here',
    headers: {
        "Authorization": "Masterkey your-master-key"
    },
    contentType: "application/json",
    data: JSON.stringify(newProps),
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

See Also


Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.