Scheduling Future Push Notifications

We’re happy that our users can usually interact with the Parse API programmatically and without much human intervention. One area where we’ve seen the need for better automation is in push notifications, where developers and administrators sometimes want to send a notification at a certain point in the future, but don’t want to write a cron job or stay by the computer waiting to hit send. To automate this situation, our REST API now supports scheduling notifications up to two weeks in the future.

For example, to notify users at 8am Pacific Time on Labor Day, you
could run:

curl -X POST 
  -H "X-Parse-Application-Id: ${APPLICATION_ID}" 
  -H "X-Parse-REST-API-Key: ${REST_API_KEY}" 
  -H "Content-Type: application/json" 
  -d '{
        "channels": [
          "holidays"
        ],
        "push_time": "2012-09-03T08:00:00-07:00",
        "data": {
          "alert": "Time to hit snooze, today is Labor Day!"
        }
      }' 

https://api.parse.com/1/push

We’ve also added a bunch of REST push examples in our docs to help you navigate our expanding push tools. Enjoy!

Brian Jacokes
August 21, 2012
blog comments powered by Disqus

Archives

Categories

RSS Feed Follow us Like us