In addition to the OneSignal web portal you may use OneSignal's Server REST API to send push notifications programmatically.
OneSignal's REST API is documented at https://documentation.onesignal.com/reference
When sending notifications through OneSignal's API, you may target users by specifying predefined segments, filtering by parameters, or specific OneSignalUserIds or other identifiers.
Segments are the most common way to target large groups of devices. You may specify which segments you want to target and, optionally, which ones you don't want to receive the notification. See Data Tags (Subscription Management) for details on using tags to create segments, both programmatically and by allowing users to self-subscribe.
You can programmatically send a push notification to a specific device based on Player Id or using an External User Id. See Personalized Push for details on configuring each of these strategies.
Updated 4 days ago