Statistics API

getMsgStats

Retrieve stats for a specific message.
post
https://cp.pushwoosh.com/json/1.3
/getMsgStats
For Private Offering subscriptions only.
Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"message": "xxxx-xxxxxxx-xxxxxx" // required, message code obtained in /createMessage request
}
}
Like every scheduled request, /getMsgStats request requires an additional /getResults request
Response body:
Field
Type
Description
request_id
string
Scheduled request Id. Please check/getResults method for more information
Scheduled (/getResults) response:
Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "minutely",
"rows": [
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "3"
},
{
"datetime": "2015-09-30 12:54:00",
"action": "open",
"count": "2"
},
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "59"
}
],
// conversion (if goal tracking is allowed)
"conversion": {
"send": 10,
"open": 5,
"events": [
{"uid": 1, "event": "event name", "hits": 5, "conversion": "100%",
"revenue": 15.34}
]
}
}
}

getMsgPlatformsStats

Retrieve specific message's statistics for one or several platforms only.
post
https://cp.pushwoosh.com/json/1.3
/getMsgPlatformsStats
For Private Offering subscriptions only.
Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"message": "xxxx-xxxxxxx-xxxxxx", // required, message code obtained from /createMessage request or Message History details
"platforms":[1,2,3,4,5] // optional, list of platform types. Please see /registerDevice for the complete list of platform types
}
}
As every scheduled request, /getMsgPlatformsStats request requires an additional /getResults request.
Response body:
Field
Type
Description
request_id
string
Scheduled request Id. Please check/getResults method for more information
Scheduled (/getResults) response:
Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "minutely",
"rows": [
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "3",
},
{
"datetime": "2015-09-30 12:54:00",
"action": "open",
"count": "2",
},
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "59",
},
.................
]
}
}

getApplicationSubscribersStats

Displays the app's subscribers list grouped by the types of their devices.
post
https://cp.pushwoosh.com/json/1.3
/getApplicationSubscribersStats
For Private Offering subscriptions only.
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // required, Pushwoosh application code
}
}

getAppStats

Get the statistics of the specific app for a specific time period.
post
https://cp.pushwoosh.com/json/1.3
/getAppStats
For Private Offering subscriptions only.
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // required, Pushwoosh application code
"datefrom": "2013-06-04 00:00:00", // required, date and time, start of the reporting period
"dateto": "2013-06-07 00:00:00" // required, date and time, end of the reporting period
}
}
Statistic displays registered actions for application, device or message, for the timeframe specified.
Reports are automatically aggregated using the following rules: yearly > 1 year monthly > 1 month daily > 1 day hourly > 3 hours minutely in other cases.
Actions: Application Level: open, install
Device Level: register, unregister
Message level: send, open
All statistics objects have the same format:
Field
Type
Description
formatter
string
report scale: yearly, monthly, daily, hourly, minutely
rows
list
report rows
Each of the report rows is a dictionary:
Field
Type
Description
count
int
registered actions count
action
string
registered action
datetime
string
Formatted date: Y-m-d H:i:s
As every scheduled request, /getAppStats request requires an additional /getResults request.
Response body:
Field
Type
Description
request_id
string
Scheduled request ID. Please check /getResults method for more information.
Scheduled (/getResults) response body:
Field
Type
Description
applications
dictionary
statistics for applications
devices
dictionary
statistics for devices
messages
dictionary
statistics for messages
Example
{
"error": {
"code": 0,
"message": "OK"
},
"json_data": {
"applications": {
"formatter": "hourly",
"rows": [{
"count": 0,
"action": "open",
"datetime": "2013-06-06 00:00:00"
}, ...
]
}
}
}

getCampaignStats

Retrieve statistics of a particular campaign for a specific time period.
post
https://cp.pushwoosh.com/json/1.3
/getCampaignStats
For Private Offering subscriptions only.
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"campaign": "XXXXX-XXXXX", // required, campaign ID
"datefrom": "Y-m-d H:i:s", // required, date and time, start of the reporting period
"dateto": "Y-m-d H:i:s" // required, date and time, end of the reporting period
}
}
As every scheduled request, /getCampaignStats request requires an additional /getResults request.
/getResults response:
Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "hourly",
"rows": [
{
"count": 0,
"action": "open",
"datetime": "2018-05-09 00:00:00",
"platformid": 14
},
{
"count": 0,
"action": "send",
"datetime": "2018-05-09 00:00:00",
"platformid": 14
},
{
"count": 0,
"action": "send",
"datetime": "2018-05-11 00:00:00",
"platformid": 14
}
],
// conversion (if goal tracking is allowed)
"conversion": {
"send": 10,
"open": 5,
"events": [
{"uid": 1, "event": "event name", "hits": 5, "conversion": "100%",
"revenue": 15.34}
]
}
}
}

getEventStatistics

Retrieves the number of times the Event was triggered during the specified period.
post
https://cp.pushwoosh.com/json/1.3
/getEventStatistics
For Private Offering subscriptions only.
{
"request" : {
"auth":"yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // required, Pushwoosh application code
"event" : "Event name", // required, the name of Event exactly as created in Pushwoosh Control Panel
"date_from" : "2018-09-12", // required, start of the reporting period
"date_to" : "2018-09-12", // required, end of the reporting period
"attributes" : [ // optional
{
"name": "attributeName",
"operator" : "EQ",
"values": ["val"]
}
]
}
}
Like every scheduled request, /getEventStatistics request requires an additional /getResults request
Response body:
Field
Type
Description
request_id
string
Scheduled request Id. Please check/getResults method for more information
Scheduled (/getResults) response:
Example
{
"status_code": 200,
"status_message": "OK",
"response": [
{
"date": "2018-09-12 00:00",
"count": 12
},
{
"date": "2018-09-12 01:00",
"count": 2
},
{
"date": "2018-09-12 02:00",
"count": 4
},
{
"date": "2018-09-12 03:00",
"count": 8
},
{
"date": "2018-09-12 04:00",
"count": 9
},
{
"date": "2018-09-12 05:00",
"count": 2
},
{
"date": "2018-09-12 06:00",
"count": 0
},
{
"date": "2018-09-12 07:00",
"count": 0
},
{
"date": "2018-09-12 08:00",
"count": 0
},
{
"date": "2018-09-12 09:00",
"count": 0
},
{
"date": "2018-09-12 10:00",
"count": 0
},
{
"date": "2018-09-12 11:00",
"count": 0
},
{
"date": "2018-09-12 12:00",
"count": 0
},
{
"date": "2018-09-12 13:00",
"count": 0
},
{
"date": "2018-09-12 14:00",
"count": 0
},
{
"date": "2018-09-12 15:00",
"count": 0
},
{
"date": "2018-09-12 16:00",
"count": 0
},
{
"date": "2018-09-12 17:00",
"count": 0
},
{
"date": "2018-09-12 18:00",
"count": 0
},
{
"date": "2018-09-12 19:00",
"count": 0
},
{
"date": "2018-09-12 20:00",
"count": 0
},
{
"date": "2018-09-12 21:00",
"count": 0
},
{
"date": "2018-09-12 22:00",
"count": 0
},
{
"date": "2018-09-12 23:00",
"count": 0
}
]
}

getTagStats

Retrieve statistics for the specified Tag.
post
https://cp.pushwoosh.com/json/1.3
/getTagStats
For Private Offering subscriptions only.
Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"tag": "TAG_NAME", // required, tag name exactly as in Pushwoosh Control Panel
"applications": ["APPLICATION_1", "APPLICATION_2", "APPLICATION_3"] // optional. Specify only when the tag is app specific.
}
}
As every scheduled request, getTagStats request requires an additional /getResults request.
/getResults response:
{
"status_code": 200,
"status_message": "OK",
"response": {
"fileName": "DIRECT_FILE_URL.csv" // direct link to the csv file
}
}
Received file is a csv file with a semicolon ";" separator.
csv file content example:
13C2B-72C62;ua_settingpushbod;3
13C2B-72C62;ua_settingpushhealth;3
13C2B-72C62;ua_settingpushstrength;3
13C2B-72C62;ua_settingpushupdate;2

getMessageLog

Displays detailed information about the messages sent.
post
https://api.pushwoosh.com/api/v2/statistics
/getMessageLog
For Private Offering subscriptions only.
One of the following fields is required: - message_id - message_code - campaign_code - hwid - user_id - date_from and date_to
Data can be downloaded up to a maximum of 30 days from the current time.
Example request
curl --location --request POST 'http://api.pushwoosh.com/api/v2/statistics/getMessageLog' \
--header 'Authorization: Key API_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"pagination_token": "PAGINATION_TOKEN_FROM_PREVIOUS_RESPONSE",
"limit": 1000,
"application_code": "XXXXX-XXXXX",
"message_code": "A444-AAABBBCC-00112233",
"message_id": 1234567890,
"campaign_code": "AAAAA-XXXXX",
"hwid": "aaazzzqqqqxxx",
"user_id": "user_123",
"date_from": "2000-01-25 00:00:00",
"date_to": "2000-02-10 23:59:59"
}'
Example response
{
"pagination_token": "PAGINATION_TOKEN_FOR_NEXT_REQUEST",
"data": [
{
"timestamp": "2000-01-25T11:18:47Z",
"application_code": "XXXXX-XXXXX",
"message_id": 12345678900,
"message_code": "A444-AAABBBCC-00112233",
"campaign_code": "AAAAA-XXXXX",
"hwid": "aaazzzqqqqxxx",
"user_id": "user_123",
"platform": "android",
"action": "sent",
"status": "success",
"push_alerts_enabled": "true"
},
{
"timestamp": "2000-01-25T11:18:49Z",
"application_code": "XXXXX-XXXXX",
"message_id": 12345678900,
"message_code": "A444-AAABBBCC-00112233",
"campaign_code": "AAAAA-XXXXX",
"hwid": "aaazzzqqqqxxx",
"user_id": "user_123",
"platform": "android",
"action": "delivered",
"push_alerts_enabled": "true"
},
{
"timestamp": "2000-01-25T11:19:23Z",
"application_code": "XXXXX-XXXXX",
"message_id": 12345678900,
"message_code": "A444-AAABBBCC-00112233",
"campaign_code": "AAAAA-XXXXX",
"hwid": "aaazzzqqqqxxx",
"user_id": "user_123",
"platform": "android",
"action": "opened",
"push_alerts_enabled": "true"
}
]
}

getSubscribersStatistics

Retrieves app subscribers stats for a time period.
post
http://go.pushwoosh.com/api/v2/statistics/application/getSubscribersStatistics
Example request
curl --location --request POST 'https://go.pushwoosh.com/api/v2/statistics/application/getSubscribersStatistics' \
--header 'Authorization: Key 3a2X......828JreCk48f' \
--header 'Content-Type: application/json' \
--data-raw '{
"application_code": "12345-67890", // Pushwoosh app code
"timestamp_from": "2022-08-01 00:00:00", // UTC+0
"timestamp_to": "2022-09-01 00:00:00" // UTC+0
}'
Example response
{
"statistics": [
{
"timestamp": "YYYY-MM-DD hh:mm:ss", // UTC+0
"platform": 1,
"push_enabled": 100,
"push_disabled": 100
}
]
}
Please take into consideration that the intervals between timestamps in the response depend on the period you send in your request as follows:
  • if you request the stats for a period longer than one year, the stats timestamps interval will be a year;
  • if the stats period equals a year, the interval between response's timestamps equals a month;
  • for periods longer than a month but less than a year, stats for every day will be returned;
  • for periods less than a month, the response will include stats for every hour.
Period in your request
Interval in response
Over 1 year
1 year
1 year
1 month
1 month - 1 year
Every day
Less than a month
Every hour
Copy link
On this page
getMsgStats
post
getMsgPlatformsStats
post
getApplicationSubscribersStats
post
getAppStats
post
getCampaignStats
post
getEventStatistics
post
getTagStats
post
getMessageLog
post
getSubscribersStatistics
post