Skip to main content

View Push Broadcasts

This endpoint lists all notifications associated with the site that have a sent status. The response is in JSON format.

GET
 https://api.pushengage.com/apiv1/notifications

Request Parameters

Parameter NameTypeRequiredDescription
statusStringNoDefine the notification status, which can be sent, scheduled, or draft. Use sent to retrieve notifications that have been sent, scheduled to retrieve notifications that are scheduled, and draft to retrieve draft notifications. If this parameter is not provided, all notifications will be retrieved.
notification_idStringNoRepresents the unique ID of the notification, generated upon its creation.
limitIntegerNoSpecifies the maximum number of notifications to display in the results. The minimum value is 1.
offsetIntegerNoSpecifies the starting index for displaying notifications in the results. The minimum value is 0.
start_dateDateNoSpecifies the start date to retrieve the sent notifications. Must be in the format YYYY-MM-DD.
end_dateDateNoSpecifies the end date to retrieve sent notifications. The range considers notifications sent from the provided start_date up to and including this end_date. Must be in the format YYYY-MM-DD.

Response Object

Property NameTypeRequiredDescription
notificationsNotification[]YesRepresents the notifications object. Further details can be found in the notifications object section.
successBooleanYesIndicates whether the push response was successful. Possible values are true or false.
countIntegerYesRepresents the total number of notifications returned in the response.
messageStringNoProvided in case of a failure, it specifies the reason for the failure.

Notification Object

Property NameTypeDescription
notification_idIntegerUnique identifier for the notification.
notification_titleStringTitle of the notification.
notification_messageStringMessage content of the notification.
notification_urlStringLanding URL associated with the notification.
notification_imageStringImage displayed within the notification.
notification_big_imageStringLarge image associated with the notification.
created_timeStringTimestamp indicating when the notification was created.
sent_timeStringTimestamp indicating when the notification was sent.
notification_expiryIntegerThe expiry duration of the notification is in seconds.
notification_criteriaStringList of criteria used to identify the user for the notification.
StatisticsStatisticsRepresents the statistics object. Further details are in the Statistics Object section.
notification_sourceStringSource from which the notification originates.
multi_element_title1StringTitle for the first interactive button in the notification.
multi_element_url1StringURL associated with the first interactive button.
multi_element_image1StringImage associated with the first interactive button.
multi_element_title2StringTitle for the second interactive button in the notification.
multi_element_url2StringURL associated with the second interactive button.
multi_element_image2StringImage associated with the second interactive button.

Statistics Object

Property NameTypeDescription
sent_countIntegerNumber of subscribers who successfully received the notification.
failed_countIntegerNumber of subscribers for whom the notification sending failed.
read_countIntegerNumber of subscribers who read the notification.
click_countIntegerNumber of subscribers who clicked on the notification.

Example of All Notifications

Request

curl -X GET -H "api_key: <your_pushengage_api_key>" "https://api.pushengage.com/apiv1/notifications"

Response

{
"success": true,
"count": 2,
"notifications": [
{
"notification_id": "123456",
"notification_title": "this is title of notification",
"notification_message": "this is message of notification",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.png",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"sent_time": "<notification_sent_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"statistics": {
"sent_count": "145",
"failed_count": "0",
"read_count": "145",
"click_count": "145"
}
"notification_source": "XXXX"

},
{
"notification_id": "123457",
"notification_title": "this is title of notification1",
"notification_message": "this is message of notification1",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.jpg",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"sent_time": "<notification_sent_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"statistics": {
"sent_count": "195",
"failed_count": "0",
"read_count": "195",
"click_count": "195"
}
"notification_source": "XXXX"
}
],
}

Example of Sent Notifications

Retrieving sent notifications requires setting the query parameter status to sent.

Request

curl -X GET -H "api_key: <your_pushengage_api_key>" "https://api.pushengage.com/apiv1/notifications?status=sent"

Response

{
"success": true,
"count": 2,
"notifications": [
{
"notification_id": "123456",
"notification_title": "this is title of notification",
"notification_message": "this is message of notification",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.png",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"sent_time": "<notification_sent_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"statistics": {
"sent_count": "145",
"failed_count": "0",
"read_count": "145",
"click_count": "145"
}
"notification_source": "XXXX"

},
{
"notification_id": "123457",
"notification_title": "this is title of notification1",
"notification_message": "this is message of notification1",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.jpg",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"sent_time": "<notification_sent_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"statistics": {
"sent_count": "195",
"failed_count": "0",
"read_count": "195",
"click_count": "195"
}
"notification_source": "XXXX"
}
],
}

Example of Scheduled Push Broadcast

Retrieving scheduled notifications requires setting the query parameter status to scheduled.

Request

curl -X GET -H "api_key: <your_pushengage_api_key>;" "https://api.pushengage.com/apiv1/notifications?status=scheduled"

Response

{
"success": true,
"count": 2,
"notifications": [
{
"notification_id": "1234567",
"notification_title": "this is title of notification",
"notification_message": "this is message of notification",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.png",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"valid_from": "<notification_scheduled_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"notification_source": "XXXX"
},
{
"notification_id": "1234568",
"notification_title": "this is title of notification1",
"notification_message": "this is message of notification1",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.jpg",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"valid_from": "<notification_scheduled_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"notification_source": "XXXX"
}
]
}

Example of Draft Notifications

Retrieving draft notifications requires setting the query parameter status to draft.

Request

curl -X GET -H "api_key: <your_pushengage_api_key>" "https://api.pushengage.com/apiv1/notifications?status=draft"

Response

{
"notifications": [
{
"notification_id": "123451",
"notification_title": "this is title of notification",
"notification_message": "this is message of notification",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.png",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"notification_source": "XXXX"
},
{
"notification_id": "123452",
"notification_title": "this is title of notification1",
"notification_message": "this is message of notification1",
"notification_url": "http://www.example.com",
"notification_image": "your_image_path/image.jpg",
"notification_big_image": "your_big_image_path/big_image.png",
"created_time": "<notification_creation_time>",
"valid_from": "<notification_scheduled_time>",
"notification_expiry": "<sec>",
"notification_criteria":"[{"filter_type":"include_countries","countries":["XXXX"]},{"filter_type":"include_states","states":["XXXX"]},{"filter_type":"include_cities","cities":["XXXX"]},{"filter_type":"include_device_types","devices":["XXXX"]},{"filter_type":"include_browsers","browsers":["XXXX"]}]",
"notification_source": "XXXX"
}
],
"success": true,
"count": 2
}