{"info":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","description":"<html><head></head><body><h2 id=\"onesignal-rest-api-overview\">OneSignal REST API Overview</h2>\n<p><img src=\"https://pbs.twimg.com/profile_images/1400095929768816641/qzyYTdii_400x400.jpg\" alt=\"\"></p>\n<p>OneSignal's server API provides robust features that can be used to:</p>\n<ul>\n<li>Sending Messages</li>\n<li>Export Data</li>\n<li>Create and Delete Segments</li>\n<li>Add and Edit Devices</li>\n<li>Create and View Apps</li>\n</ul>\n<p><strong>Postman OneSignal Docs:</strong></p>\n<p><a href=\"https://documenter.getpostman.com/view/16845437/TzscpSWK\">https://documenter.getpostman.com/view/16845437/TzscpSWK</a></p>\n<p><strong>To learn more, visit</strong>:</p>\n<p><a href=\"https://documentation.onesignal.com/docs/onesignal-api\">https://documentation.onesignal.com/docs/onesignal-api</a></p>\n<p><strong>Authorization</strong>: Basic {{REST_API_KEY}}</p>\n<p>or</p>\n<p><strong>Authorization</strong>: Basic {{USER_AUTH_KEY}}</p>\n<p><strong>API Version</strong>: 8.0  </p>\n<p>Join our developer community on Discord &amp; Twitter&gt;  </p>\n<p>To learn more about the OneSignal Developer Community visit <a href=\"https://onesignal.com/onesignal-developers\">our official page</a>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"16845437","collectionId":"2783b546-3051-4ef5-96b3-ab8403c94a1b","publishedId":"TzscpSWK","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303293","highlight":"E54B4D"},"publishDate":"2021-07-28T18:10:18.000Z"},"item":[{"name":"Notifications","item":[{"name":"Create Notification","event":[{"listen":"test","script":{"id":"27b1f88f-3bab-47df-a92d-489d6ddada35","exec":["let jsonResponse = pm.response.json();","console.log(\"ENVIROMENT\", pm.environment);","pm.environment.set(\"NOTIFICATION_ID\", jsonResponse.id);"],"type":"text/javascript"}}],"id":"c4f3498f-fd80-4304-a6c1-a3234b923f2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"app_id\": \"{{APP_ID}}\",\n  \"included_segments\": [\"Subscribed Users\"],\n  \"data\": {\"foo\": \"bar\"},\n  \"contents\": {\"en\": \"Sampple Push Message\"}\n}"},"url":"{{BASE_URL}}/notifications","description":"<p>Sends notifications to your users.  </p>\n<p>The Create Notification method is used when you want your server to programmatically send messages. You may target users in one of three ways using this method: by <strong>Segment</strong>, by <strong>Filter</strong>, or by <strong>User ID</strong>. At least one targeting parameter must be specified.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/create-notification\">https://documentation.onesignal.com/reference/create-notification</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/notifications\">https://onesignal.com/api/v1/notifications</a></p>\n","urlObject":{"path":["notifications"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c4f3498f-fd80-4304-a6c1-a3234b923f2c"},{"name":"View Notification","id":"6c96ecf0-5882-4eac-a386-0d0cabc8ecd2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/notifications/{{NOTIFICATION_ID}}?app_id={{APP_ID}}","description":"<p>View the details of a single notification and outcomes associated with it.</p>\n<h3 id></h3>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\">Keys &amp; IDs</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-notification\">https://documentation.onesignal.com/reference/view-notification</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/notifications/:id?app_id=:app_id\">https://onesignal.com/api/v1/notifications/:id?app_id=:app_id</a></p>\n","urlObject":{"path":["notifications","{{NOTIFICATION_ID}}"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"}],"variable":[]}},"response":[],"_postman_id":"6c96ecf0-5882-4eac-a386-0d0cabc8ecd2"},{"name":"View Notifications","event":[{"listen":"test","script":{"id":"c86a84f0-f370-4fe9-b9f3-fe47d4f0ed5e","exec":["let response = pm.response.json();","let notifications = response.notifications;","let labels = [];","","let vizData = {","    labels: labels,","    successArray: [],","    failedArray: [],","    erroredArray: [],","    convertedArray: [],","    receivedArray: [],","    title: \"\"","}","","let index = 0;","","while (labels.length <=0){","   if(notifications[index].platform_delivery_stats.safari_web_push && notifications[index].platform_delivery_stats.chrome_web_push) {","       let stats = notifications[index].platform_delivery_stats;","       console.log(\"stats=\", stats);","       Object.entries(stats).map(stat => {","","        vizData.successArray.push(stat[1].successful);","        vizData.failedArray.push(stat[1].failed);","        vizData.erroredArray.push(stat[1].errored);","        vizData.convertedArray.push(stat[1].converted);","        vizData.receivedArray.push(stat[1].received);","        vizData.title = `Notification stats for Notification Id: ${notifications[index].id}`","    })","       labels = Object.keys(stats);","       vizData.labels = labels;","   }","   index++;","}","","","let template = `","<script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js'></script>","<canvas id=\"myChart\" width=\"400\" height=\"400\"></canvas>","<script>","const ctx = document.getElementById('myChart');","const myChart = new Chart(ctx, {","  type: 'bar',","  data: {","    labels: [],","    datasets: [{","      label: 'Successful',","      backgroundColor: \"green\",","      data: [],","    }, {","      label: 'Failed',","      backgroundColor: \"red\",","      data: [],","    }, {","      label: 'Errored',","      backgroundColor: \"black\",","      data: [],","    }, {","      label: 'Converted',","      backgroundColor: \"blue\",","      data: [],","    }, {","      label: 'Received',","      backgroundColor: \"pink\",","      data: [],","    }],","  },","options: {","    title: {","        display: true,","        text: 'Notifications'","    },","    tooltips: {","      displayColors: true,","      callbacks:{","        mode: 'x',","      },","    },","    scales: {","      xAxes: [{","        stacked: true,","        gridLines: {","          display: false,","        }","      }],","      yAxes: [{","        stacked: true,","        ticks: {","          beginAtZero: true,","        },","        type: 'linear',","      }]","    },","    responsive: true,","    maintainAspectRatio: false,","    legend: { position: 'bottom' },","  }","});","","pm.getData((err, value)=> {","    console.log(\"value=\", value);","    myChart.data.labels = value.labels;","    myChart.data.datasets[0].data = value.successArray;","    myChart.data.datasets[1].data = value.failedArray;","    myChart.data.datasets[2].data = value.erroredArray;","    myChart.data.datasets[3].data = value.convertedArray;","    myChart.data.datasets[4].data = value.receivedArray;","    myChart.options.title.text = value.title;","    myChart.update();","})","</script>","`;","","pm.visualizer.set(template, vizData)"],"type":"text/javascript"}}],"id":"ac1173b3-4613-4356-8d9a-fc466b9c8be7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/notifications?app_id={{APP_ID}}","description":"<p>View the details of multiple notifications.</p>\n<h3 id></h3>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\">Keys &amp; IDs</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-notifications\">https://documentation.onesignal.com/reference/view-notifications</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/notifications?app_id=YOUR_APP_ID&amp;limit=:limit&amp;offset=:offset&amp;kind=:kind\">https://onesignal.com/api/v1/notifications?app_id=YOUR_APP_ID&amp;limit=:limit&amp;offset=:offset&amp;kind=:kind</a></p>\n","urlObject":{"path":["notifications"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"}],"variable":[]}},"response":[],"_postman_id":"ac1173b3-4613-4356-8d9a-fc466b9c8be7"},{"name":"Cancel Notification","id":"c0049fec-5025-42e3-a4a0-497c659da742","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/notifications/{{NOTIFICATION_ID}}?app_id={{APP_ID}}","description":"<p>Stop a scheduled or currently outgoing notification.</p>\n<p>Used to stop a scheduled or currently outgoing notification.</p>\n<h3 id></h3>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys#section-keys-ids\">Keys &amp; IDs</a>.</p>\n<p><em>unless the notification was created using</em> <em><code>include_player_ids</code></em> <em>and targeting only one user.</em></p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/cancel-notification\">https://documentation.onesignal.com/reference/cancel-notification</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/notifications/:id?app_id=:app_id\">https://onesignal.com/api/v1/notifications/:id?app_id=:app_id</a></p>\n","urlObject":{"path":["notifications","{{NOTIFICATION_ID}}"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"}],"variable":[]}},"response":[],"_postman_id":"c0049fec-5025-42e3-a4a0-497c659da742"},{"name":"Notification History","id":"fc5b48e1-d11c-4043-90ea-a6e94955b3b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"events\": \"clicked\",\n    \"app_id\": \"YOUR-APP-ID\",\n    \"email\": \"x@example.com\"\n}"},"url":"{{BASE_URL}}/notifications/{{NOTIFICATION_ID}}/history","description":"<p>View the devices sent a message - OneSignal Paid Plan Required.</p>\n<p><strong>notification_id</strong>*string</p>\n<p><code>The \"id\" of the message found in the</code> <a href=\"https://documentation.onesignal.com/reference/notification-history#create-notification\"><code>creation notification POST response</code></a><code>,</code> <a href=\"https://documentation.onesignal.com/reference/notification-history\"><code>View Notifications GET response</code></a><code>, or URL within the</code> <a href=\"https://documentation.onesignal.com/docs/notification-delivery\"><code>Message Report</code></a><code>.</code></p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/notification-history\">https://documentation.onesignal.com/reference/notification-history</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/notifications/:notification_id/history\">https://onesignal.com/api/v1/notifications/:notification_id/history</a></p>\n","urlObject":{"path":["notifications","{{NOTIFICATION_ID}}","history"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc5b48e1-d11c-4043-90ea-a6e94955b3b5"}],"id":"6619556f-f01d-4c08-8aab-569f02c71f77","_postman_id":"6619556f-f01d-4c08-8aab-569f02c71f77","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"App","item":[{"name":"Create App","id":"b49c2005-223b-4acb-a87d-13ed46dc2149","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{USER_AUTH_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\"name\" : \"Sample body\",\n\"apns_env\": \"production\",\n\"apns_p12\": \"asdsadcvawe223cwef...\",\n\"apns_p12_password\": \"test123\",\n\"gcm_key\": \"A Google Cloud Messaging Key\"\n}","options":{"raw":{"language":"json"}}},"url":"{{BASE_URL}}/apps","description":"<p>Creates a new OneSignal app.</p>\n<p>Requires User Authentication Key</p>\n<p>Requires your OneSignal <strong>User Auth Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys#user-auth-key\">Account &amp; API Keys</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/create-an-app\">https://documentation.onesignal.com/reference/create-an-app</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps\">https://onesignal.com/api/v1/apps</a></p>\n","urlObject":{"path":["apps"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b49c2005-223b-4acb-a87d-13ed46dc2149"},{"name":"View Apps","id":"c5b55f53-957b-4ae0-a9dc-c9fccd5f3afa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Basic {{USER_AUTH_KEY}}","type":"text"}],"url":"{{BASE_URL}}/apps","description":"<p>View the details of all of your current OneSignal apps.</p>\n<h3 id></h3>\n<p>Requires User Authentication Key</p>\n<p>Requires your OneSignal <strong>User Auth Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys#user-auth-key\">Account &amp; API Keys</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-apps-apps\">https://documentation.onesignal.com/reference/view-apps-apps</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps\">https://onesignal.com/api/v1/apps</a></p>\n","urlObject":{"path":["apps"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5b55f53-957b-4ae0-a9dc-c9fccd5f3afa"},{"name":"View An App","id":"44bbcfa9-911f-4cb7-9234-92718e3ef1b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{USER_AUTH_KEY}}","type":"text"}],"url":"{{BASE_URL}}/apps/{{APP_ID}}","description":"<p>View the details of a single OneSignal app.</p>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\">Keys &amp; IDs</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-an-app\">https://documentation.onesignal.com/reference/view-an-app</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:id\">https://onesignal.com/api/v1/apps/:id</a></p>\n","urlObject":{"path":["apps","{{APP_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"44bbcfa9-911f-4cb7-9234-92718e3ef1b8"},{"name":"Update An App","id":"f0c084ac-461e-438f-82ca-11b3e08720bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{USER_AUTH_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\" : \"onesignal-test yay\"\n}"},"url":"{{BASE_URL}}/apps/{{APP_ID}}","description":"<p>Updates the name or configuration settings of an existing OneSignal app.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/update-an-app\">https://documentation.onesignal.com/reference/update-an-app</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:id\">https://onesignal.com/api/v1/apps/:id</a></p>\n","urlObject":{"path":["apps","{{APP_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f0c084ac-461e-438f-82ca-11b3e08720bf"}],"id":"d112e81e-0a19-4696-8abd-3092604c5c7d","_postman_id":"d112e81e-0a19-4696-8abd-3092604c5c7d","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"Device","item":[{"name":"View Device","id":"99d3571e-836e-410d-b5fa-6e0fdf022962","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{BASE_URL}}/players/{{PLAYER_ID}}","description":"<p>View the details of an existing device in one of your OneSignal apps.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-device\">https://documentation.onesignal.com/reference/view-device</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players/:id\">https://onesignal.com/api/v1/players/:id</a></p>\n","urlObject":{"path":["players","{{PLAYER_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"99d3571e-836e-410d-b5fa-6e0fdf022962"},{"name":"View Devices","id":"50dde7a8-54c5-4eec-8934-73f781e9cad1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/players?app_id={{APP_ID}}&limit=300&offset=0","description":"<p>View the details of multiple devices in one of your OneSignal apps.</p>\n<h3 id></h3>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\">Keys &amp; IDs</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-devices\">https://documentation.onesignal.com/reference/view-devices</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players?app_id=:app_id&amp;limit=:limit&amp;offset=:offset\">https://onesignal.com/api/v1/players?app_id=:app_id&amp;limit=:limit&amp;offset=:offset</a></p>\n","urlObject":{"path":["players"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"},{"key":"limit","value":"300"},{"key":"offset","value":"0"}],"variable":[]}},"response":[],"_postman_id":"50dde7a8-54c5-4eec-8934-73f781e9cad1"},{"name":"Edit Device","id":"1ec0b8eb-297c-4b34-91fb-5abe972087ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"app_id\" : \"YOUR_APP_ID\",\n\"language\":\"es\",\n\"timezone\":-28800,\n\"game_version\":\"1.0\",\n\"device_os\":\"7.0.4\",\n\"device_type\":0,\n\"device_model\":\"iPhone\",\n\"tags\":{\"EXAMPLE\":\"TAG 1\",\"EXAMPLE2\":\"TAG 2\"}\n}"},"url":"{{BASE_URL}}/players/{{PLAYER_ID}}","description":"<p>Update an existing device in one of your OneSignal apps.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/edit-device\">https://documentation.onesignal.com/reference/edit-device</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players/:id\">https://onesignal.com/api/v1/players/:id</a></p>\n","urlObject":{"path":["players","{{PLAYER_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1ec0b8eb-297c-4b34-91fb-5abe972087ad"},{"name":"Add a Device","id":"9d5c2d5b-5282-4996-b664-d13ee7f0b9ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"app_id\" : \"YOUR_APP_ID\",\n    \"identifier\":\"identifier_auth_hash\",\n    \"language\":\"en\",\n    \"timezone\":-28800,\n    \"game_version\":\"X.X\",\n    \"device_os\":\"X.X.X\",\n    \"device_type\":0,\n    \"device_model\":\"X\",\n    \"tags\":{\"a\":\"X\",\"foo\":\"X\"}\n}"},"url":"{{BASE_URL}}/players","description":"<p>Register a new device to one of your OneSignal apps.</p>\n<p>This method is used to register a new device with OneSignal.</p>\n<p>If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/add-a-device\">https://documentation.onesignal.com/reference/add-a-device</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players\">https://onesignal.com/api/v1/players</a></p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}},"urlObject":{"path":["players"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d5c2d5b-5282-4996-b664-d13ee7f0b9ec"}],"id":"73baceac-4451-479c-aac1-b156d0c42d9e","_postman_id":"73baceac-4451-479c-aac1-b156d0c42d9e","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"Segment","item":[{"name":"Create Segments","id":"af22b838-bbe8-40fc-bf8a-3943bc19bf3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"EXAMPLE SEGMENT\", \n  \"filters\": [\n    {\"field\": \"device_type\", \"relation\": \"=\", \"value\": \"iOS\"},\n    {\"operator\": \"OR\"},\n    {\"field\": \"device_type\", \"relation\": \"=\", \"value\": \"Android\"},\n    {\"operator\": \"OR\"},\n    {\"field\": \"device_type\", \"relation\": \"=\", \"value\": \"Web Push (Browser)\"}\n  ]\n}"},"url":"{{BASE_URL}}/apps/{{APP_ID}}/segments","description":"<p>Create segments visible and usable in the dashboard and API.</p>\n<p><strong>app_id</strong>*string</p>\n<p><code>The OneSignal App ID for your app. Available in</code> <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\"><code>Keys &amp; IDs</code></a><code>.</code></p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/create-segments\">https://documentation.onesignal.com/reference/create-segments</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:app_id/segments\">https://onesignal.com/api/v1/apps/:app_id/segments</a></p>\n","urlObject":{"path":["apps","{{APP_ID}}","segments"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"af22b838-bbe8-40fc-bf8a-3943bc19bf3b"},{"name":"Delete Segments","id":"50d2ba91-a0cb-4ab0-a2c5-70545ba7eb66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/apps/{{APP_ID}}/segments/{{SEGMENT_ID}}","description":"<p>Delete segments (not user devices) - Required: OneSignal Paid Plan.</p>\n<p>**<br />app_id***string</p>\n<p><code>The OneSignal App ID for your app. Available in</code> <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\"><code>Keys &amp; IDs</code></a><code>.</code></p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/delete-segments\">https://documentation.onesignal.com/reference/delete-segments</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:app_id/segments/:segment_id\">https://onesignal.com/api/v1/apps/:app_id/segments/:segment_id</a></p>\n","urlObject":{"path":["apps","{{APP_ID}}","segments","{{SEGMENT_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"50d2ba91-a0cb-4ab0-a2c5-70545ba7eb66"}],"id":"9596b87e-f8cc-4c7a-81a8-ca6d99d6b793","_postman_id":"9596b87e-f8cc-4c7a-81a8-ca6d99d6b793","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"Outcome","item":[{"name":"View Outcomes","id":"ecff8fa6-4f10-4238-bf89-c50f157760ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"url":"{{BASE_URL}}/apps/{{APP_ID}}/outcomes?outcome_names=os__click.count&outcome_platforms=0","description":"<p>View the details of all the outcomes associated with your app.</p>\n<h3 id></h3>\n<p>Requires Authentication Key</p>\n<p>Requires your OneSignal App's <strong>REST API Key</strong>, available in <a href=\"https://documentation.onesignal.com/docs/accounts-and-keys\">Keys &amp; IDs</a>.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/view-outcomes\">https://documentation.onesignal.com/reference/view-outcomes</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:app_id/outcomes?outcome_names=:outcome_names\">https://onesignal.com/api/v1/apps/:app_id/outcomes?outcome_names=:outcome_names</a></p>\n","urlObject":{"path":["apps","{{APP_ID}}","outcomes"],"host":["{{BASE_URL}}"],"query":[{"key":"outcome_names","value":"os__click.count"},{"key":"outcome_platforms","value":"0"}],"variable":[]}},"response":[],"_postman_id":"ecff8fa6-4f10-4238-bf89-c50f157760ef"}],"id":"2db0945d-e511-4499-adf9-4e85bc3cc38f","_postman_id":"2db0945d-e511-4499-adf9-4e85bc3cc38f","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"Export","item":[{"name":"CSV Export","id":"bdd496e6-4d40-4b49-8fcd-1f7dd31dc07a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Basic {{REST_API_KEY}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"extra_fields\": [\"country\",\"notification_types\",\"external_user_id\", \"location\", \"rooted\", \"ip\", \"country\", \"web_auth\", \"web_p256\"],\n    \"last_active_since\": \"1469392779\", \"segment_name\": \"Active Users\"\n}","options":{"raw":{"language":"json"}}},"url":"{{BASE_URL}}/players/csv_export?app_id={{APP_ID}}","description":"<p>Generate a compressed CSV export of all of your current user data.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/csv-export\">https://documentation.onesignal.com/reference/csv-export</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players/csv_export?app_id=:app_id\">https://onesignal.com/api/v1/players/csv_export?app_id=:app_id</a></p>\n","urlObject":{"path":["players","csv_export"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"}],"variable":[]}},"response":[],"_postman_id":"bdd496e6-4d40-4b49-8fcd-1f7dd31dc07a"}],"id":"0f47d16a-d27d-43e6-891b-30bc2a1954c8","_postman_id":"0f47d16a-d27d-43e6-891b-30bc2a1954c8","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}},{"name":"User","item":[{"name":"Edit Tag With External User Id","id":"51a98166-f2e6-4894-89cd-bb5dc25c97ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"tags\":{\"a\":\"1\",\"foo\":\"\"}\n}"},"url":"{{BASE_URL}}/apps/{{APP_ID}}/users/{{EXTERNAL_USER_ID}}","description":"<p>Update an existing device's tags in one of your OneSignal apps using the External User ID.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/edit-tags-with-external-user-id\">https://documentation.onesignal.com/reference/edit-tags-with-external-user-id</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/apps/:app_id/users/:external_user_id\">https://onesignal.com/api/v1/apps/:app_id/users/:external_user_id</a></p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}},"urlObject":{"path":["apps","{{APP_ID}}","users","{{EXTERNAL_USER_ID}}"],"host":["{{BASE_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"51a98166-f2e6-4894-89cd-bb5dc25c97ed"},{"name":"Delete User Record","id":"7c8e0e75-5579-42b1-86eb-10fab4b50c95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{BASE_URL}}/players/{{ONESIGNAL_PLAYER_ID}}?app_id={{APP_ID}}","description":"<p>Delete a user record.</p>\n<p>Documentation: <a href=\"https://documentation.onesignal.com/reference/delete-user-record\">https://documentation.onesignal.com/reference/delete-user-record</a></p>\n<p>Endpoint: <a href=\"https://onesignal.com/api/v1/players/:ONESIGNAL_PLAYER_ID?app_id=:ONESIGNAL_APP_ID\">https://onesignal.com/api/v1/players/:ONESIGNAL_PLAYER_ID?app_id=:ONESIGNAL_APP_ID</a></p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}},"urlObject":{"path":["players","{{ONESIGNAL_PLAYER_ID}}"],"host":["{{BASE_URL}}"],"query":[{"key":"app_id","value":"{{APP_ID}}"}],"variable":[]}},"response":[],"_postman_id":"7c8e0e75-5579-42b1-86eb-10fab4b50c95"}],"id":"c9bcef18-c1ee-44a4-bb86-488a7a03caca","_postman_id":"c9bcef18-c1ee-44a4-bb86-488a7a03caca","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","id":"2783b546-3051-4ef5-96b3-ab8403c94a1b","name":"OneSignal API","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]}},"event":[{"listen":"prerequest","script":{"id":"dd4b8109-4431-4053-8e05-50dde943134a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0e6bc3e6-b2a3-4b93-8071-2c0d6ce4fe97","type":"text/javascript","exec":[""]}}]}