Java client API or CURL command for Inactivity trigger?

Hi All,

I was unable to find Java client API or CURL command for Inactivity trigger.
Can any one provide the Java API and curl command for Inactivity trigger.

Didn't find what you were looking for?

New post


1 comment

  • Hi Chnakaya, 

    While the automation API isn't currently supported by the Java library, you can create a cURL command for an inactivity trigger. An inactivity trigger is a historical object, which you can find more information about here:

    The complete cURL command would look something like this: 

    curl \
       -X POST \
       -u "<AppKey>:<MasterSecret>" \
       -H "Accept: application/vnd.urbanairship+json; version=3" \
       -H "Content-Type: application/json" \
       -d '{
              "name": "inactive",
              "enabled": true,
              "historical_trigger": { "event": "open", "equals": 0, "days": 30 },     
              "outcome": {
                 "push": {
                    "audience": "triggered",
                    "notification": { "alert": "Whatever you would like to say here" },
                    "device_types": "all"

    This particular command creates an inactivity trigger that sends a notification if a user hasn't opened your application in thirty days, but you can specify it to be anywhere up to 90 days. For more examples of API requests, you can view this topic guide: I hope this helps!

    Comment actions Permalink

Please sign in to leave a comment.