View the details of a single message and the Outcomes associated with it.
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.
Currently this API does not provide Journey-sent messages. See Journey analytics for details.
Messages sent through the API 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.
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.
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.
To view outcome data for the message, you must include the outcome_name
parameter with the name of the outcome you want to fetch, along with the accompanying aggregation type (.count or .sum), for example: os__click.count
. For more information on outcome definitions, see View Outcomes.
Your App API key with prefix Key
. See Keys & IDs.
The identifier of the message in UUID v4 format. Get this id
in the response of your Create Message API request, the View Messages API, and in your OneSignal dashboard Message Reports.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The name and aggregation type of the outcome(s) you want to fetch. Example: my_outcome.count
or my_outcome.sum
. For clicks, use os__click.count
. For confirmed deliveries, use os__confirmed_delivery.count
. For session duration, use os__session_duration.count
.
Time range for the returned data. Available values: 1h
(1 hour), 1d
(1 day), 1mo
(1 month)
1h
, 1d
, 1mo
The platforms in which you want to pull the data represented as the device_type
integer.
Attribution type for the outcomes.
direct
, influenced
, unattributed
, total
200
Returns all message properties set. See the Push notifications, Email, and/or SMS Message Create APIs for all properties. Most commonly used properties for this endpoint are listed.
View the details of a single message and the Outcomes associated with it.
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.
Currently this API does not provide Journey-sent messages. See Journey analytics for details.
Messages sent through the API 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.
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.
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.
To view outcome data for the message, you must include the outcome_name
parameter with the name of the outcome you want to fetch, along with the accompanying aggregation type (.count or .sum), for example: os__click.count
. For more information on outcome definitions, see View Outcomes.
Your App API key with prefix Key
. See Keys & IDs.
The identifier of the message in UUID v4 format. Get this id
in the response of your Create Message API request, the View Messages API, and in your OneSignal dashboard Message Reports.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The name and aggregation type of the outcome(s) you want to fetch. Example: my_outcome.count
or my_outcome.sum
. For clicks, use os__click.count
. For confirmed deliveries, use os__confirmed_delivery.count
. For session duration, use os__session_duration.count
.
Time range for the returned data. Available values: 1h
(1 hour), 1d
(1 day), 1mo
(1 month)
1h
, 1d
, 1mo
The platforms in which you want to pull the data represented as the device_type
integer.
Attribution type for the outcomes.
direct
, influenced
, unattributed
, total
200
Returns all message properties set. See the Push notifications, Email, and/or SMS Message Create APIs for all properties. Most commonly used properties for this endpoint are listed.