View the details of a single message and the Outcomes associated with it.
Overview
The View message API allows you to fetch data from a single push, email, or SMS message at a time. If you want to get multiple messages at a time, use the View messages API. In most cases, you will likely want to use Event Streams instead.
This API is most commonly used when sending Transactional messages to individual users. The response of our Create message API has an id
which corresponds to the message_id
used in this request. You can store this message_id
on your server and (after giving your users some time to interact with the message) pull the data if desired.
Currently this API does not provide Journey-sent messages. See Journey analytics for details.
Messages sent through the API and Automated Messages are only accessible 30 days after creation; however, messages sent using the OneSignal dashboard are accessible for the app's lifetime.
See our Rate limits for details on how often you can pull your message data with this API.
Response data
The properties returned will include the same properties used in the original Create message request, along with the message analytics at the time of the request.
For example, if you send a message targeting the include_aliases
parameter, the response will include the aliases you set. If you send with the included_segments
parameter, then the response will only provide the segments you set. When targeting segments or filters, you can use the Export audience activity CSV API to get the user event data.
The table below lists all non-customizable properties returned. Properties not listed here can be found in Push channel parameters, Email channel parameters, and SMS channel parameters, depending on the target channel.
Common Parameters | Definitions |
---|---|
"successful" | Number of notifications delivered to the Google/Apple/Windows servers. |
"failed" | Number of devices reported as unsubscribed. |
"errored" | Number of devices with an error. See your "Settings" tab for details or contact Support. |
"converted" | Number of devices that have clicked/tapped the notification.converted data will not be shown for Apple macOS & Windows (Phone & Desktop). OneSignal doesn't support SDKs for these platforms. |
"received" | Number of devices that confirmed receiving the notification aka Confirmed Deliveries.received data is not available for:- Safari Web Push - Windows Apps - macOS Apps - Chrome App Extensions |
"platform_delivery_stats" | Hash of delivery statistics broken out by target device platform. |
"queued_at" | Unix timestamp indicating when the message was created. |
"send_after" | Unix timestamp indicating when message delivery should begin. |
"completed_at" | Unix timestamp indicating when message delivery was completed. The delivery duration from start to finish can be calculated with completed_at - send_after . |
"throttle_rate_per_minute" | Number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the message, and for Free accounts, null is returned. Refer to Throttling for more details. |
"outcomes" | For a list of Outcomes definitions, see View Outcomes. |