Server API Reference
OneSignal's server API provides robust features that can be used to:
- Messages can be sent to segments, data filters (which are similar to segments but without creating the reusable segment name), and specific devices by a User ID.
- All available parameters are supported like Content & Language, custom data & images, and scheduling options.
- Plenty of Example Code in commonly used languages to get you started.
- If you scheduled a notification in the future and decide not to send anymore, you can also Cancel notification with the notification id available in the response after sending.
Our API also provides Notification History which shows which specific devices "clicked" or were "sent" a specific notification.
OneSignal allows you to target devices directly by data filters if you don't want to create segments or don't plan to send many notifications to these filter combinations.
If you are looking to create a lot of Segments and do not want to go through our Dashboard GUI, you can use our Create Segments to do this quickly and later Delete Segments if you don't need them anymore.
OneSignal's API provides the Edit device method to update user records server side. Common parameters that can be updated are
external_user_id if needing to stay updated with an Internal Database, DMP, & CRM.
The Add a device endpoint to upload your subscriber data. It is important to note that importing devices may not be enough to start sending them push. Each device must have a valid "push token"/
identifier that authenticates the device with FCM/APNs. Further Android Devices must have our SDK active in the app to process our Notification Payload Structure and Websites need our Service Workers downloaded on the subscriber's browser to get our notifications.
OneSignal houses related Mobile Apps and Websites under a single OneSignal App. If you have many apps and/or websites that are not related, you can use the Create an app endpoint to generate OneSignal App Ids for each platform quickly.
Updated 8 months ago