REST API overview
REST API overview
OneSignal's RESTful API is based on the REST Architecture and provides robust features
that can be used for the below operations.
Requirements
The OneSignal API is accessed using an HTTPS connection with TLS 1.2 support or higher
on standard port 443.
Firewalls and proxies must allow outbound HTTPS traffic on port 443 to connect to our
REST API. See below FCM and APNS requirements as well.
IP Addresses: OneSignal uses Google Cloud Platform (GCP) data centers located in
Groningen, Netherlands. There is a wide range of IPs that can be used and are subject to
change. For the most up-to-date list, you can check here for scope: europe-west4 .
https://firebase.google.com/docs/cloud-messaging/concept-options#messaging-ports-
and-your-firewall
https://support.apple.com/en-us/102266
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notif
ication_server/sending_notification_requests_to_apns?language=objc
Send messages
Programmatically deliver push notifications, emails, and sms from your server.
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, email
address, or phone number depending on channel.
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.
For example, your marketing team can create the template in the dashboard and your
developers can pull the template_id to use with Create notification or pull stats with View
notifications.
https://documentation.onesignal.com/reference/rest-api-overview 2/4
06/03/2025, 15:09 REST API overview
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.
Pull message data with View notifications or individually with View notification. The
response will contain the properties sent in each message request and the message's
current analytics. Analytics > Message Tracking for details.
Export CSV of Events - generates a CSV of event data (clicked, received, sent, etc) for a
specific message.
FAQ
https://documentation.onesignal.com/reference/rest-api-overview 3/4
06/03/2025, 15:09 REST API overview
OneSignal will wait 30 seconds for a response before automatically canceling the request.
To verify no duplicate requests go through, you can add an Idempotent Key with the
external_id parameter.
For example:
Terminal
If you get the full cert chain then the root cert will be the first one in the list. You would not
have to change that one or worry if Cloudflare changes it because those root certs have to
be copied into the root trust stores of billions of machines.
https://documentation.onesignal.com/reference/rest-api-overview 4/4