Overview
Use this API to programmatically update an existing OneSignal app. This is useful when managing multiple apps or organizations, and avoids needing to manually use the OneSignal Dashboard. You can create an app under an existing organization or generate a new one. Push platform configurations for Web, Android, and iOS can be defined during app creation, though Email and SMS must be set up manually via the OneSignal Dashboard.For an overview of how apps and organizations work in OneSignal, see Apps & Organizations.
How to use this API
Use your Organization API Key, to authenticate. This key is different from the standard REST API key. The Organization API key must be assocated with theorganization_id in the request body.
Web push configuration
The following parameters are required for web push setup:site_namechrome_web_originsafari_site_originsafari_apns_p12: Empty string OR your Base64 encoded p12 certificate for Safari Push Notifications.safari_apns_p12_password: Empty string OR Password for yoursafari_apns_p12file if set.
https:// and match your site’s origin.
safari_apns_p12 and safari_apns_p12_password are required for safari_site_origin to be set. If you do not have your own Safari p12 certificate, they should be included with blank values.If you use your own p12 certificate, you must update it every year.
If you need help Base64 encoding your p12 certificate, you can use the following site: https://www.base64encode.orgchrome_web_default_notification_icon: URL of a256x256pxPNG for Chrome.safari_icon_256_256: URL of a256x256pxPNG for Safari.
Android mobile push configuration
The following parameter is required for Android push notifications. See Android: Firebase Credentials.fcm_v1_service_account_json
If you need help Base64 encoding your FCM Service Account JSON file, you can use the following site: https://www.base64encode.org
iOS mobile push configuration
iOS mobile push can be configured using either a p8 or a p12 authentication.If you need help Base64 encoding your p8 key or p12 certificate, you can use the following site: https://www.base64encode.org
apns_key_idapns_team_idapns_bundle_idapns_p8
apns_p12apns_p12_password
additional_data_as_root_payload: If set totrue, thedataparamater in your push notification payload will be added to the root payload of the notification. Helpful for customizations that require access to the data outside of our OSNotification payloadadditionalDataproperty.
Headers
Path Parameters
Body
application/json