IOS

User identifiers

In order to find a user to whom you need to send a notification, it is possible specify one or several available identifiers:

Notification settings

The object of a message for the iOS platform contains 2 fields:

  • payload (object) - describes the main content of a notification

  • options (object) - describes the optional settings of notification delivery

Notification content settings ("payload" object)

Notification delivery and display settings (“options” object)

Button templates

The text on the buttons, which are on the list of templates, is translated into N languages and displayed to users individually according to the location of a device.

Examples

Push

​https://devtodev.com/api/v1/push/send

POST

{
    "user_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "campaign_tag": "campaign name",
    "pack_id": "uniqueid1234",
    "audience": [{
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "idfa": "XXXXX-XXXXX-XXXXXX-XXXXXX",
        "idfv": "XXXXX-XXXXX-XXXX-XXXXX-XXXX",
        "userId": "xxxxxxxxxxxx"
    }],
    "ios": {
        "payload": {
            "title": "Title of the notification",
            "text": "Notification content.",
            "data": {
                "key1": "value",
                "key2": "15"
            },
            "badge": 11,
            "sound": "bingbong.aiff",
            "attachment": {
                "type": "image",
                "url": "https://domain.com/pic.png"
            },
            "action": {
                "url": "http://www.domain.com"
            },
            "interactive": {
                "template": "dtd_accept.open_decline.dismiss",
                "buttons": [{
                    "id": "accept",
                    "action": {
                        "url": "http://www.domain.com/accept"
                    }
                }]
            }
        },
        "options": {
            "hidden": false,
            "priority": "normal",
            "expire": "36000",
            "collapse_key": "qwerqwer"
        }
    }
}

Hidden push

​https://devtodev.com/api/v1/push/send

POST

{
    "user_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "campaign_tag": "campaign name",
    "pack_id": "uniqueid1234",
    "audience": [{
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "idfa": "XXXXX-XXXXX-XXXXXX-XXXXXX",
        "idfv": "XXXXX-XXXXX-XXXX-XXXXX-XXXX",
        "userId": "xxxxxxxxxxxx"
    }],
    "ios": {
        "payload": {
            "data": {
                "key1": "value",
                "key2": "15"
            },
            "badge": "11"
        },
        "options": {
            "hidden": true,
            "priority": "normal",
            "expire": "36000"
        }
    }
}

Last updated