https://documentation.onesignal.com/v5.0/reference
You need to use "push notification"and “web api” components.
And check this link.