View the details of all the outcomes associated with your app


Requires Authentication Key

Requires your OneSignal App's REST API Key, available in Keys & IDs.


Outcome Data Limitations

Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.

Path Parameters

Comma-separated list of names and the value (sum/count) for the returned outcome data.
Note: Clicks only support count aggregation.

For out-of-the-box OneSignal outcomes such as click and session duration, please use the “os” prefix with two underscores. For other outcomes, please use the name specified by the user.

(if outcome names have commas in them)
If outcome names contain any commas, then please specify only one value at a time.

Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count
where “Sales, Purchase” is the custom outcomes with a comma in the name.
Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data).

Default is 1h if the parameter is omitted.
Platform id. Refer device's platform ids for values.

outcome_platform=0 for iOS
outcome_platform=7,8 for Safari and Firefox

Default is data from all platforms if the parameter is omitted.
Attribution type for the outcomes. The values can be direct or influenced or unattributed.

Example: outcome_attribution=direct

Default is total (returns direct+influenced+unattributed) if the parameter is omitted.

Example Code - View Outcomes

curl --include \
    --header "Authorization: Basic NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj" \
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, '{appId}/outcomes?outcome_names=os__click.count&outcome_platforms=0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = array();
$headers[] = 'Authorization: Basic NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);

Returned Fields

  • id - name of the outcome
  • value - returned value of the aggregation type
  • aggregation - aggregation type (sum or count) requested for the outcome

Result Format - View notification

 "outcomes": [
     "id": "os__session_duration",
     "value": 100,
     "aggregation": "sum"
     "id": "os__click",
     "value": 4,
     "aggregation": "count"
     "id": "Sales",
     "value": 348,
     "aggregation": "sum"