Skip to main content

Notification Object

This section outlines the Notification Object.

Notification Object Attributes

The fields listed in the table below will be returned in a JSON object when a successful request has been made.

AttributeData TypeDescription
android_click_actionstringThe action that is performed when a user taps the notification on Android devices. You must have an activity with a matching intent filter in your application.
android_iconstringThe icon for the application notifications on Android devices.
android_soundstringThe sound file included in the application that will play instead of the default device notification sound for Android devices.
android_tagstringIndicates whether each notification message results in a new entry on the notification center on Android devices. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification center.
bodystringThe notification body text.
collapse_keystringIdentifies a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed for Android devices.
dataobjectA custom data object that is passed back to the application.
ios_badgeintegerThe badge on the client application home icon used with iOS devices. If not specified, the badge is not changed. If set to 0, the badge is removed.
ios_categorystringThe notification type. It corresponds to the category payload of the aps dictionary.
ios_collapse_idstringEnables apns-collapse-id header key that allows the application to display only the last message of a group of messages with the same collapse key for iOS devices.
ios_content_availablebooleanDefines if the support for the background update notification is enabled or not, allowing iOS to wake up the application in the background. It corresponds to the content-available payload of the aps dictionary.
ios_mutable_contentintegerDefines if the content of the notification can be modified before the user device displays it. It corresponds to the mutable-content payload of the aps dictionary.
ios_push_typestringThe type of the APNs push notification. This field enables the apns-push-type header key required for watchOS 6 and later, recommended for macOS, iOS, tvOS, and iPadOS. Values accepted in this field are: alert, background, complication, fileprovider, mdm, and voip. Refer to Apple documentation for more information on each push type.
ios_soundstringThe sound file included in the application that will play instead of the default device notification sound for iOS devices. You must place the custom sound files in your application bundle or in the Library/Sounds folder of your application container directory before you can use them with notifications.
ios_thread_idstringThe application-specific unique category identifier, which ensures that these notifications are differentiated from the rest and grouped together.
ios_topicstringThe topic for the notification. It corresponds to the apns-topic key and usually looks like this: com.example.MyApp.
notification_sid
read only
stringThe notification secure ID.
partner_sid
read only
stringThe secure ID of the partner associated with the message.
prioritystringThe delivery priority for the notification. Values accepted in this field are: very_low, low, normal, high, and very_high.
recipientsarrayThe list of devices secure IDs which will receive the notification.
titlestringThe notification title.
ttlintegerThe time to live for the notification, measured in seconds.

Sample Notification Object

{
"android_click_action": null,
"android_icon": null,
"android_sound": null,
"android_tag": null,
"body": "This is a test push notification for two registered devices.",
"collapse_key": null,
"data": {},
"ios_badge": null,
"ios_category": null,
"ios_collapse_id": null,
"ios_content_available": true,
"ios_mutable_content": null,
"ios_push_type": "alert",
"ios_sound": null,
"ios_thread_id": null,
"ios_topic": null,
"notification_sid": "d4f37407-f5ca-4242-891f-720efeae387b",
"partner_sid": "e00430c3-a7d0-4666-ab5c-f7202448382f",
"priority": "normal",
"recipients": [
"901dd79e-ff4f-4ff3-9b48-c095dfb4fcef",
"16e64699-3064-463b-8dc7-96783c08a3d9"
],
"title": "Notification for two recipients",
"ttl": 60,
}