{"message_code":"XXXXX-XXXXXXXXX-XXXXXXXX",// (Required) Unique message identifier"platforms": [1,2,3] // (Optional) List of platform codes}
Response fields
Name
Type
Description
metrics
array
Contains an array of message metrics.
timestamp
string
The time of the metric.
platform
int
The platform code (e.g., iOS, Android). Learn more
sends
string
The number of sent messages.
opens
string
The number of opened messages.
deliveries
string
The number of delivered messages.
inbox_opens
string
The number of inbox opens.
unshowable_sends
string
The number of sent messages that could not be shown.
errors
string
The number of errors.
conversion
object
Contains conversion data.
sends
string
The total number of sent messages.
opens
string
The total number of opened messages.
events
array
An array of events with their statistics.
name
string
The name of the event (e.g., cart add).
hits
string
The number of hits.
conversion
float
The conversion rate relative to opens.
revenue
float
The revenue (only for events with __amount and __currency attributes).
Response example
{"metrics": [ {"timestamp":"2024-08-03 15:00:00",// Timestamp of the metrics in "YYYY-MM-DD HH:MM:SS" format"platform":3,// Platform code"sends":"55902",// Number of messages sent"opens":"382",// Number of messages opened"deliveries":"22931",// Number of messages delivered"inbox_opens":"0",// Number of messages opened in the inbox"unshowable_sends":"2",// Number of messages that couldn't be shown"errors":"0"// Number of errors encountered } ],"conversion": {"sends":"55902",// Total number of messages sent"opens":"772",// Total number of messages opened"events": [ {"name":"cart_add",// Name of the event"hits":"96",// Number of hits for the event"conversion":0.12,// Conversion rate relative to opens"revenue":0// Revenue generated by the event (only for events with amount/currency attributes) } ] }}
getMessageLog
Displays detailed information about the messages sent.
Select messages events by Message IDs obtained from message history. For example, 12345678900.
message_code
String
Select messages events by message codes obtained from /createMessage API responses. For example, A444-AAABBBCC-00112233.
campaign_code
String
Select messages events by campaign codes specified in your messages payload. For example, AAAAA-XXXXX.
hwid
String or Array
Select messages events by an HWID or by array or HWID's.
date_from
Datetime
Select messages events by the date and time they've launched (max 30 days from the current date). For example, 2000-01-25 00:00:00.
limit
Integer
Limits the number of messages events in single response. Max value is 100000.
date_to
Datetime
Select messages events by the date and time to stop sending. For example, 2000-01-26 00:00:00
pagination_token
String
pagination_token obtained from previous /getMessageLog response.
user_id
String
Select messages events by an custom user_id. For more info see /registerUser
application_code
String
Select messages events by application code
actions
array
Array of message actions to filter the results by. Possible values: "sent", "delivered", "opened", "inbox_delivered", "inbox_read", "inbox_opened", "inbox_deleted". The response will include all the messages with the specified action(s).
platforms
array
Array of target platforms to filter the results by. Possible values: “ios”, “blackberry”, “android”, “windows phone”, “osx”, “windows”, “amazon”, “safari”, “chrome”, “firefox”, “ie”, “email”, “baidu android”, “huawei android”.
{"error": "exceeded the maximum date interval. Max interval: 30 days"}
{"error": "account not found"}
One of the following fields is required:
- message_id
- message_code
- campaign_code
- hwid
- user_id
- date_from and date_to
Consider applying various filtration params to get the most of your messages stats.
Data can be downloaded up to a maximum of 30 days from the current time.
Example request
curl --location --request POST 'https://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",// optional, token for pagination"limit":1000,// optional, the max number of entries for a single response"application_code":"XXXXX-XXXXX",// Pushwoosh app code"message_code":"A444-AAABBBCC-00112233",// optional, message code obtained from /createMessaage request"message_id":1234567890,// optional, message ID obtained from Pushwoosh Control Panel"campaign_code":"AAAAA-XXXXX",// optional, code of a campaign to get the log for"hwid":"aaazzzqqqqxxx",// optional, hardware ID of a specific device targeted with a message"user_id":"user_123",// optional, ID of a user targeted with the message"date_from":"2000-01-25 00:00:00",// optional, start of the stats period "date_to":"2000-02-10 23:59:59"// optional, end of the stats period, "actions": ["opened", "inbox_opened"], // optional, used for results filtration. Possible values: "sent", "opened", "delivered", "inbox_delivered", "inbox_read", "inbox_opened", "inbox_deleted". The response will include all the messages with the specified action(s).
"platforms": ["ios", "chrome"] // optional, used for results filtration. Possible values: "ios", "android", "osx", "windows", "amazon", "safari", "chrome", "firefox", "ie", "email", "baidu android", "huawei android"
}'
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",// actions returned: sent, opened, delivered; // for pushes sent to inbox: inbox_delivered, inbox_read, inbox_opened, inbox_delete"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",// actions returned: sent, opened, delivered; // for pushes sent to inbox: inbox_delivered, inbox_read, inbox_opened, inbox_delete"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":"inbox_delivered",// actions returned: sent, opened, delivered; // for pushes sent to inbox: inbox_delivered, inbox_read, inbox_opened, inbox_delete
"push_alerts_enabled":"true" } ]}
For iOS, please make sure that you have added the Notification Service Extension to your project for tracking push delivery. Learn more
{"error": "exceeded the maximum date interval. Max interval: 30 days"}
{"error": "account not found"}
Example request
curl --location --request POST 'https://api.pushwoosh.com/api/v2/statistics/emails/linksInteractions' \--header 'Authorization: Api API_ACCESS_TOKEN' \--header 'Content-Type: application/json' \--data-raw '{"filters": {"date_range": {"date_from":"string",// Required format: 2000-01-01"date_to":"string"// Required format: 2000-01-01 },"campaign":"string",// Campaign code (you can specify application, messages_ids, or message_codes instead)"application":"string",// Application code (you can specify campaign, messages_ids, or message_codes instead"messages_ids": [],// Message IDs (you can specify application, campaign, or message_codes instead)"messages_codes": [],// Message codes (you can specify application, campaign, or message_ids instead"link_template":"string",// Link template (required if application or campaign is specified)"template":"string"// Email template code },"params": { "with_full_links": true // Specify whether to show detalied statistics. A list of full links with statistics will be passed in the full_links array.
}}'