You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DefaultApi.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,7 @@ Stop a scheduled or currently outgoing notification
58
58
59
59
Used to stop a scheduled or currently outgoing notification
60
60
61
+
61
62
### Parameters
62
63
63
64
@@ -89,6 +90,7 @@ Copy template to another app
89
90
90
91
Copy a template to a destination app.
91
92
93
+
92
94
### Parameters
93
95
94
96
@@ -121,6 +123,7 @@ Name | Type | Description | Required | Notes
121
123
122
124
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
123
125
126
+
124
127
### Parameters
125
128
126
129
@@ -154,6 +157,7 @@ Name | Type | Description | Required | Notes
154
157
155
158
Upserts one or more Aliases for the User identified by :subscription_id.
156
159
160
+
157
161
### Parameters
158
162
159
163
@@ -186,6 +190,7 @@ Create API key
186
190
187
191
Use this API to create a new App API Key (also called a Rich Authentication Token) for a specific OneSignal app. These keys are used to authenticate API requests at the app level and offer enhanced security features, including optional IP allowlisting.
188
192
193
+
189
194
### Parameters
190
195
191
196
@@ -217,6 +222,7 @@ Create an app
217
222
218
223
Creates a new OneSignal app
219
224
225
+
220
226
### Parameters
221
227
222
228
@@ -247,6 +253,7 @@ Create custom events
247
253
248
254
The Custom Events API allows you to record user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones.
Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit.
310
350
351
+
311
352
### Parameters
312
353
313
354
@@ -339,6 +380,7 @@ Name | Type | Description | Required | Notes
339
380
340
381
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
341
382
383
+
342
384
### Parameters
343
385
344
386
@@ -372,6 +414,7 @@ Create template
372
414
373
415
Create reusable message templates for push, email, and SMS channels.
374
416
417
+
375
418
### Parameters
376
419
377
420
@@ -402,6 +445,7 @@ Name | Type | Description | Required | Notes
402
445
403
446
Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
404
447
448
+
405
449
### Parameters
406
450
407
451
@@ -433,6 +477,7 @@ Name | Type | Description | Required | Notes
433
477
434
478
Deletes an alias by alias label
435
479
480
+
436
481
### Parameters
437
482
438
483
@@ -466,6 +511,7 @@ Delete API key
466
511
467
512
Delete a specific Rich Authentication Token (App API Key) for a OneSignal app. Requires your Organization API Key and the token’s unique ID, not the token value itself.
468
513
514
+
469
515
### Parameters
470
516
471
517
@@ -497,6 +543,7 @@ Delete Segment
497
543
498
544
Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
499
545
546
+
500
547
### Parameters
501
548
502
549
@@ -528,6 +575,7 @@ Name | Type | Description | Required | Notes
528
575
529
576
Deletes the Subscription.
530
577
578
+
531
579
### Parameters
532
580
533
581
@@ -559,6 +607,7 @@ Delete template
559
607
560
608
Delete a template by id.
561
609
610
+
562
611
### Parameters
563
612
564
613
@@ -590,6 +639,7 @@ Name | Type | Description | Required | Notes
590
639
591
640
Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
592
641
642
+
593
643
### Parameters
594
644
595
645
@@ -622,6 +672,7 @@ Export CSV of Events
622
672
623
673
Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
624
674
675
+
625
676
### Parameters
626
677
627
678
@@ -653,6 +704,7 @@ Export CSV of Subscriptions
653
704
654
705
Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
655
706
707
+
656
708
### Parameters
657
709
658
710
@@ -684,6 +736,7 @@ Name | Type | Description | Required | Notes
684
736
685
737
Lists all Aliases for the User identified by (:alias_label, :alias_id).
686
738
739
+
687
740
### Parameters
688
741
689
742
@@ -716,6 +769,7 @@ Name | Type | Description | Required | Notes
716
769
717
770
Lists all Aliases for the User identified by :subscription_id.
718
771
772
+
719
773
### Parameters
720
774
721
775
@@ -747,6 +801,7 @@ View an app
747
801
748
802
View the details of a single OneSignal app
749
803
804
+
750
805
### Parameters
751
806
752
807
@@ -777,6 +832,7 @@ View apps
777
832
778
833
View the details of all of your current OneSignal apps
779
834
835
+
780
836
### Parameters
781
837
782
838
This endpoint does not need any parameter.
@@ -804,6 +860,7 @@ View notification
804
860
805
861
View the details of a single notification and outcomes associated with it
806
862
863
+
807
864
### Parameters
808
865
809
866
@@ -835,6 +892,7 @@ Notification History
835
892
836
893
-> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs.
837
894
895
+
838
896
### Parameters
839
897
840
898
@@ -866,6 +924,7 @@ View notifications
866
924
867
925
View the details of multiple notifications
868
926
927
+
869
928
### Parameters
870
929
871
930
@@ -899,6 +958,7 @@ View Outcomes
899
958
900
959
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.
901
960
961
+
902
962
### Parameters
903
963
904
964
@@ -934,6 +994,7 @@ Get Segments
934
994
935
995
Returns an array of segments from an app.
936
996
997
+
937
998
### Parameters
938
999
939
1000
@@ -966,6 +1027,7 @@ Name | Type | Description | Required | Notes
966
1027
967
1028
Returns the User’s properties, Aliases, and Subscriptions.
968
1029
1030
+
969
1031
### Parameters
970
1032
971
1033
@@ -998,6 +1060,7 @@ Rotate API key
998
1060
999
1061
Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch.
1000
1062
1063
+
1001
1064
### Parameters
1002
1065
1003
1066
@@ -1029,6 +1092,7 @@ Start Live Activity
1029
1092
1030
1093
Remotely start a Live Activity on iOS devices via OneSignal’s REST API.
1031
1094
1095
+
1032
1096
### Parameters
1033
1097
1034
1098
@@ -1061,6 +1125,7 @@ Name | Type | Description | Required | Notes
1061
1125
1062
1126
Transfers this Subscription to the User identified by the identity in the payload.
1063
1127
1128
+
1064
1129
### Parameters
1065
1130
1066
1131
@@ -1093,6 +1158,7 @@ Unsubscribe with token
1093
1158
1094
1159
Unsubscribe an email with a token when using your own custom email unsubscribe landing page
1095
1160
1161
+
1096
1162
### Parameters
1097
1163
1098
1164
@@ -1125,6 +1191,7 @@ Update API key
1125
1191
1126
1192
Update a Rich Authentication Token (App API Key) for a OneSignal app.
1127
1193
1194
+
1128
1195
### Parameters
1129
1196
1130
1197
@@ -1157,6 +1224,7 @@ Update an app
1157
1224
1158
1225
Updates the name or configuration settings of an existing OneSignal app
1159
1226
1227
+
1160
1228
### Parameters
1161
1229
1162
1230
@@ -1188,6 +1256,7 @@ Update a Live Activity via Push
1188
1256
1189
1257
Updates a specified live activity.
1190
1258
1259
+
1191
1260
### Parameters
1192
1261
1193
1262
@@ -1220,6 +1289,7 @@ Name | Type | Description | Required | Notes
1220
1289
1221
1290
Updates an existing Subscription’s properties.
1222
1291
1292
+
1223
1293
### Parameters
1224
1294
1225
1295
@@ -1252,6 +1322,7 @@ Update subscription by token
1252
1322
1253
1323
Update properties on an existing OneSignal subscription using its token.
1254
1324
1325
+
1255
1326
### Parameters
1256
1327
1257
1328
@@ -1285,6 +1356,7 @@ Update template
1285
1356
1286
1357
Update an existing template.
1287
1358
1359
+
1288
1360
### Parameters
1289
1361
1290
1362
@@ -1317,6 +1389,7 @@ Name | Type | Description | Required | Notes
1317
1389
1318
1390
Updates an existing User’s properties.
1319
1391
1392
+
1320
1393
### Parameters
1321
1394
1322
1395
@@ -1350,6 +1423,7 @@ View API keys
1350
1423
1351
1424
View the details of all of your current app API keys (Rich Authentication Token) for a single OneSignal app.
0 commit comments