Skip to main content
Server path: /onesignal | Type: Application | PCID required: Yes

Tools

ToolDescription
onesignal_begin_live_activityStart Live Activity
onesignal_cancel_notificationStop a scheduled or currently outgoing notification
onesignal_create_appCreate an app
onesignal_create_notificationCreate notification
onesignal_create_playerAdd a device
onesignal_create_segmentsCreate Segments
onesignal_create_subscriptionCreates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
onesignal_create_userCreates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
onesignal_delete_aliasDeletes an alias by alias label
onesignal_delete_playerDelete a user record
onesignal_delete_segmentsDelete Segments
onesignal_delete_subscriptionDeletes the Subscription.
onesignal_delete_userRemoves the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
onesignal_end_live_activityStop Live Activity
onesignal_export_eventsExport CSV of Events
onesignal_export_playersExport CSV of Players
onesignal_fetch_aliasesLists all Aliases for the User identified by :subscription_id.
onesignal_fetch_userReturns the User’s properties, Aliases, and Subscriptions.
onesignal_fetch_user_identityLists all Aliases for the User identified by (:alias_label, :alias_id).
onesignal_get_appView an app
onesignal_get_appsView apps
onesignal_get_eligible_iamsManifest of In-App Messages the Subscription is eligible to display by the SDK.
onesignal_get_notificationView notification
onesignal_get_notification_historyNotification History
onesignal_get_notificationsView notifications
onesignal_get_outcomesView Outcomes
onesignal_get_playerView device
onesignal_get_playersView devices
onesignal_identify_user_by_aliasUpserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
onesignal_identify_user_by_subscription_idUpserts one or more Aliases for the User identified by :subscription_id.
onesignal_transfer_subscriptionTransfers this Subscription to the User identified by the identity in the payload.
onesignal_update_appUpdate an app
onesignal_update_live_activityUpdate a Live Activity via Push
onesignal_update_playerEdit device
onesignal_update_player_tagsEdit tags with external user id
onesignal_update_subscriptionUpdates an existing Subscription’s properties.
onesignal_update_userUpdates an existing User’s properties.

onesignal_begin_live_activity

Start Live Activity Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
activity_idstringYesLive Activity record ID
push_tokenstringYesPush Token
subscription_idstringYesSubscription Id

onesignal_cancel_notification

Stop a scheduled or currently outgoing notification Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
notification_idstringYesNotification Id

onesignal_create_app

Create an app Parameters:
ParameterTypeRequiredDefaultDescription
additional_data_is_root_payloadbooleanNoiOS: Notification data (additional data) values will be added to the root of the apns payload when sent to the device. Ignore if you’re not using any other plugins, or not using OneSignal SDK methods to read the payload.
android_gcm_sender_idstringNoAndroid: Your Google Project number. Also known as Sender ID.
apns_bundle_idstringNoiOS: Required if using p8. Bundle ID for your app in the Apple ecosystem.
apns_certificatesstringNoApns Certificates
apns_envstringNoiOS: Either sandbox or production
apns_key_idstringNoiOS: Required if using p8. Unique identifier for the p8 authentication key.
apns_p12stringNoiOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded.
apns_p12_passwordstringNoiOS: Required if using p12 certificate. Password for the apns_p12 file.
apns_p8stringNoiOS: Required if using p8. Base64 encoded p8 key
apns_team_idstringNoiOS: Required if using p8. Team ID generated by Apple for your developer account.
basic_auth_keystringNoBasic Auth Key
chrome_keystringNoNot for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions.
chrome_web_default_notification_iconstringNoChrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80.
chrome_web_originstringNoChrome (All Browsers except Safari) (Recommended): The URL to your website. This field is required if you wish to enable web push and specify other web push parameters.
chrome_web_sub_domainstringNoChrome (All Browsers except Safari): A subdomain of your choice in order to support Web Push on non-HTTPS websites. This field must be set in order for the chrome_web_gcm_sender_id property to be processed.
created_atstringNoCreated At
gcm_keystringNoAndroid: Your Google Push Messaging Auth Key
idstringNoThe id value
messageable_playersintegerNoMessageable Players
namestringNoThe name of your app, as displayed on your apps list on the dashboard. This can be renamed.
organization_idstringNoThe Id of the Organization you would like to add this app to.
playersintegerNoThe players value
safari_apns_certificatesstringNoSafari Apns Certificates
safari_apns_p12stringNoSafari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded.
safari_apns_p12_passwordstringNoSafari: Password for safari_apns_p12 file
safari_icon_128_128stringNoSafari Icon 128 128
safari_icon_16_16stringNoSafari Icon 16 16
safari_icon_256_256stringNoSafari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide.
safari_icon_32_32stringNoSafari Icon 32 32
safari_icon_64_64stringNoSafari Icon 64 64
safari_push_idstringNoSafari Push Id
safari_site_originstringNoSafari (Recommended): The hostname to your website including http(s)://
site_namestringNoAll Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it.
updated_atstringNoUpdated At

onesignal_create_notification

Create notification Parameters:
ParameterTypeRequiredDefaultDescription
adm_big_picturestringNoChannel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL.
adm_groupstringNoChannel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android’s Notification Grouping feature.
adm_group_messageobjectNoChannel: Push Notifications Platform: Amazon Summary message to display when 2+ notifications are stacked together. Default is ”# new messages”. Include [notif_count] in your message and it will be replaced with the current number. "en" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. The value of each key is the message that will be sent to users for that language. Example: {"en": "You have [notif_count] new messages”}
adm_large_iconstringNoChannel: Push Notifications Platform: Amazon If blank the small_icon is used. Can be a drawable resource name or a URL. See: How to create large icons
adm_small_iconstringNoChannel: Push Notifications Platform: Amazon If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons
adm_soundstringNoChannel: Push Notifications Platform: Amazon ⚠️Deprecated, this field doesn’t work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: “notification”
aggregationstringNoThe aggregation value
android_accent_colorstringNoChannel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): “FFFF0000”
android_background_layoutobjectNoChannel: Push Notifications Platform: Android Allowing setting a background image for the notification. This is a JSON object containing the following keys. See our Background Image documentation for image sizes.
android_channel_idstringNoChannel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it’s id.
android_groupstringNoChannel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android’s Notification Grouping feature.
android_group_messagestringNoChannel: Push Notifications Platform: Android Note: This only works for Android 6 and older. Android 7+ allows full expansion of all message. Summary message to display when 2+ notifications are stacked together. Default is ”# new messages”. Include [notif_count] in your message and it will be replaced with the current number. Languages - The value of each key is the message that will be sent to users for that language. "en" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. Read more: supported languages. Example: {"en": "You have [notif_count] new messages”}
android_led_colorstringNoChannel: Push Notifications Platform: Android ⚠️Deprecated, this field doesn’t work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): “FF0000FF”
android_soundstringNoChannel: Push Notifications Platform: Android ⚠️Deprecated, this field doesn’t work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: “notification”
android_visibilityintegerNoChannel: Push Notifications Platform: Android 5.0_ ⚠️Deprecated, this field doesn’t work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set “Hide sensitive notification content” in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
apns_alertobjectNoChannel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple’s guide on localizing push notifications to learn more.
apns_push_type_overridestringNoChannel: Push Notifications Platform: iOS valid values: voip Set the value to voip for sending VoIP Notifications This field maps to the APNS header apns-push-type. Note: alert and background are automatically set by OneSignal
app_idstringYesRequired: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434.
app_urlstringNoChannel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including iOS, Android, macOS, Windows, ChromeApps, etc. Example: https://onesignal.com
big_picturestringNoChannel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL.
buttonsobject[]NoChannel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{“id”: “id2”, “text”: “second button”, “icon”: “ic_menu_share”}, {“id”: “id1”, “text”: “first button”, “icon”: “ic_menu_send”}]
channel_for_external_user_idsstringNoIndicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string “push” to indicate you are sending a push notification or the string “email”for sending emails or “sms”for sending SMS.
chrome_big_picturestringNoChannel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL.
chrome_iconstringNoChannel: Push Notifications Platform: ChromeApp This flag is not used for web push For web push, please see chrome_web_icon instead. The local URL to an icon to use. If blank, the app icon will be used.
chrome_web_badgestringNoChannel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge.
chrome_web_iconstringNoChannel: Push Notifications Platform: Chrome Sets the web push notification’s icon. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. Firefox will also use this icon, unless you specify firefox_icon.
chrome_web_imagestringNoChannel: Push Notifications Platform: Chrome 56+ Sets the web push notification’s large image to be shown below the notification’s title and text. Please see Web Push Notification Icons.
collapse_idstringNoChannel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters.
content_availablebooleanNoChannel: Push Notifications Platform: iOS Sending true wakes your app from background to run custom native code (Apple interprets this as content-available=1). Note: Not applicable if the app is in the “force-quit” state (i.e app was swiped away). Omit the contents field to prevent displaying a visible notification.
contentsobjectNoThe contents value
custom_dataobjectNoChannel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {“order_id”: 123, “currency”: “USD”, “amount”: 25}
dataobjectNoChannel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {“abc”: 123, “foo”: “bar”, “event_performed”: true, “amount”: 12.1}
delayed_optionstringNoChannel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed.
delivery_time_of_daystringNoChannel: All Use with delayed_option=timezone. Examples: “9:00AM” “21:45” “9:45:30”
email_bodystringNoChannel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid.
email_from_addressstringNoChannel: Email The email address the email is from. If not specified, will default to “from email” set in the OneSignal Dashboard Email Settings.
email_from_namestringNoChannel: Email The name the email is from. If not specified, will default to “from name” set in the OneSignal Dashboard Email Settings.
email_preheaderstringNoChannel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null.
email_subjectstringNoChannel: Email Required. The subject of the email.
existing_android_channel_idstringNoChannel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code.
external_idstringNoCorrelation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it’s important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true
filtersobject[]NoThe filters value
firefox_iconstringNoChannel: Push Notifications Platform: Firefox Not recommended Few people need to set Firefox-specific icons. We recommend setting chrome_web_icon instead, which Firefox will also use. Sets the web push notification’s icon for Firefox. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices.
headingsobjectNoThe headings value
huawei_accent_colorstringNoChannel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device’s theme color if not set.
huawei_big_picturestringNoChannel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL.
huawei_channel_idstringNoChannel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it’s id.
huawei_existing_channel_idstringNoChannel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code.
huawei_large_iconstringNoChannel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons
huawei_led_colorstringNoChannel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): “0000FF”
huawei_msg_typestringNoChannel: Push Notifications Platform: Huawei Use “data” or “message” depending on the type of notification you are sending. More details in Data & Background Notifications.
huawei_small_iconstringNoChannel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set.
huawei_soundstringNoChannel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: “/res/raw/notification”
huawei_visibilityintegerNoChannel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set “Hide sensitive notification content” in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
idstringNoThe id value
include_unsubscribedbooleanNoChannel: Email Default is false. This field is used to send transactional notifications. If set to true, this notification will also be sent to unsubscribed emails. If a template_id is provided, the include_unsubscribed value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP’s list of unsubscribed emails to be cleared.
ios_attachmentsobjectNoChannel: Push Notifications Platform: iOS 10+ Adds media attachments to notifications. Set as JSON object, key as a media id of your choice and the value as a valid local filename or URL. User must press and hold on the notification to view. Do not set mutable_content to download attachments. The OneSignal SDK does this automatically Example: {“id1”: “https://domain.com/image.jpg”&#125;
ios_badgeCountintegerNoChannel: Push Notifications Platform: iOS Used with ios_badgeType, describes the value to set or amount to increase/decrease your app’s iOS badge count by. You can use a negative number to decrease the badge count when used with an ios_badgeType of Increase.
ios_badgeTypestringNoChannel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app’s iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. None leaves the count unaffected. SetTo directly sets the badge count to the number specified in ios_badgeCount. Increase adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count.
ios_categorystringNoChannel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category.
ios_soundstringNoChannel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: “notification.wav”
isAdmbooleanNoIndicates whether to send to all devices registered under your app’s Amazon Fire platform.
isAndroidbooleanNoIndicates whether to send to all devices registered under your app’s Google Android platform.
isAnyWebbooleanNoIndicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one.
isChromebooleanNoThis flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app’s Google Chrome Apps & Extension platform.
isChromeWebbooleanNoIndicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform.
isFirefoxbooleanNoIndicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform.
isHuaweibooleanNoIndicates whether to send to all devices registered under your app’s Huawei Android platform.
isIosbooleanNoIndicates whether to send to all devices registered under your app’s Apple iOS platform.
isSafaribooleanNoDoes not support iOS Safari. Indicates whether to send to all Apple’s Safari desktop users registered under your Safari web push platform. Read more iOS Safari
isWP_WNSbooleanNoIndicates whether to send to all devices registered under your app’s Windows platform.
large_iconstringNoChannel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons
mutable_contentbooleanNoChannel: Push Notifications Platform: iOS 10+ Always defaults to true and cannot be turned off. Allows tracking of notification receives and changing of the notification content in your app before it is displayed. Triggers didReceive(_:withContentHandler:) on your UNNotificationServiceExtension.
namestringNoRequired for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.
priorityintegerNoChannel: Push Notifications Platform: Android, Chrome, ChromeWeb Delivery priority through the push server (example GCM/FCM). Pass 10 for high priority or any other integer for normal priority. Defaults to normal priority for Android and high for iOS. For Android 6.0+ devices setting priority to high will wake the device out of doze mode.
send_afterstringNoChannel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. “Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)” “September 24th 2015, 2:00:00 pm UTC-07:00” “2015-09-24 14:00:00 GMT-0700” “Sept 24 2015 14:00:00 GMT-0700” “Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)” Note: SMS currently only supports send_after parameter.
small_iconstringNoChannel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons
sms_fromstringNoChannel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
sms_media_urlsstring[]NoChannel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs.
subtitleobjectNoThe subtitle value
summary_argstringNoChannel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say “12 more notifications from John Doe”. The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as “X more notifications from summary_arg”
summary_arg_countintegerNoChannel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be “14 more notifications from summary_arg”
target_content_identifierstringNoChannel: Push Notifications Platform: iOS 13+ Use to target a specific experience in your App Clip, or to target your notification to a specific window in a multi-scene App.
template_idstringNoChannel: Push Notifications Platform: All Use a template you setup on our dashboard. The template_id is the UUID found in the URL when viewing a template on our dashboard. Example: be4a8044-bbd6-11e4-a581-000c2940e62c
thread_idstringNoChannel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group.
throttle_rate_per_minutestringNoChannel: All Apps with throttling enabled: - the parameter value will be used to override the default application throttling value set from the dashboard settings. - parameter value 0 indicates not to apply throttling to the notification. - if the parameter is not passed then the default app throttling value will be applied to the notification. Apps with throttling disabled: - this parameter can be used to throttle delivery for the notification even though throttling is not enabled at the application level. Refer to throttling for more details.
ttlintegerNoChannel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days).
urlstringNoChannel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com
valueintegerNoThe value value
web_buttonsobject[]NoChannel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{“id”: “like-button”, “text”: “Like”, “icon”: “http://i.imgur.com/N8SN8ZS.png”, “url”: “https://yoursite.com”}, {“id”: “read-more-button”, “text”: “Read more”, “icon”: “http://i.imgur.com/MIxJp1L.png”, “url”: “https://yoursite.com”}]
web_push_topicstringNoChannel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics.
web_urlstringNoChannel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including Chrome, Firefox, Safari, Opera, etc. Example: https://onesignal.com
wp_wns_soundstringNoChannel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: “notification.wav”

onesignal_create_player

Add a device Parameters:
ParameterTypeRequiredDefaultDescription
ad_idstringNoThe ad id for the device’s platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId
amount_spentnumberNoAmount the user has spent in USD, up to two decimal places
app_idstringNoApp Id
badge_countintegerNoCurrent iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client.
countrystringNoCountry code in the ISO 3166-1 Alpha 2 format
created_atintegerNoUnixtime when the player joined the game
device_modelstringNoDevice make and model. Example: iPhone5,1
device_osstringNoDevice operating system version. Example: 7.0.4
device_typeintegerYesRequired The device’s platform: 0 = iOS 1 = Android 2 = Amazon 3 = WindowsPhone (MPNS) 4 = Chrome Apps / Extensions 5 = Chrome Web Push 6 = Windows (WNS) 7 = Safari 8 = Firefox 9 = MacOS 10 = Alexa 11 = Email 13 = For Huawei App Gallery Builds SDK Setup. Not for Huawei Devices using FCM 14 = SMS
email_auth_hashstringNoEmail - Only required if you have enabled Identity Verification and device_type is email (11).
external_user_idstringNoa custom user ID
external_user_id_auth_hashstringNoOnly required if you have enabled Identity Verification and device_type is NOT 11 email.
game_versionstringNoVersion of your app. Example: 1.1
idstringNoThe device’s OneSignal ID
identifierstringNoRecommended: For Push Notifications, this is the Push Token Identifier from Google or Apple. For Apple Push identifiers, you must strip all non alphanumeric characters. Examples: iOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0 Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV… For Email Addresses, set the full email address email@email.com and make sure to set device_type to 11.
invalid_identifierbooleanNoIf true, this is the equivalent of a user being Unsubscribed
languagestringNoLanguage code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en
last_activeintegerNoUnixtime when the player was last active
latnumberNoLatitude of the device, used for geotagging to segment on.
longnumberNoLongitude of the device, used for geotagging to segment on.
notification_typesintegerNo1 = subscribed -2 = unsubscribed iOS - These values are set each time the user opens the app from the SDK. Use the SDK function set Subscription instead. Android - You may set this but you can no longer use the SDK method setSubscription later in your app as it will create synchronization issues.
playtimeintegerNoSeconds player was running your app.
sdkstringNoName and version of the sdk/plugin that’s calling this API method (if any)
session_countintegerNoNumber of times the user has played the game, defaults to 1
tagsobjectNoCustom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {“foo”:“bar”,“this”:“that”} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM
test_typeintegerNoThis is used in deciding whether to use your iOS Sandbox or Production push certificate when sending a push when both have been uploaded. Set to the iOS provisioning profile that was used to build your app. 1 = Development 2 = Ad-Hoc Omit this field for App Store builds.
timezoneintegerNoNumber of seconds away from UTC. Example: -28800

onesignal_create_segments

Create Segments Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
filtersany[]NoFilter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters.
idstringNoUUID of the segment. If left empty, it will be assigned automaticaly.
namestringNoName of the segment. You’ll see this name on the Web UI.

onesignal_create_subscription

Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id
retain_previous_ownerbooleanNoRetain Previous Owner
subscriptionobjectNoThe subscription value

onesignal_create_user

Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
identityobjectNoThe identity value
propertiesobjectNoThe properties value
subscription_optionsobjectNoSubscription Options
subscriptionsobject[]NoThe subscriptions value

onesignal_delete_alias

Deletes an alias by alias label Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id
alias_label_to_deletestringYesAlias Label To Delete

onesignal_delete_player

Delete a user record Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
player_idstringYesThe OneSignal player_id

onesignal_delete_segments

Delete Segments Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
segment_idstringYesThe segment_id can be found in the URL of the segment when viewing it in the dashboard.

onesignal_delete_subscription

Deletes the Subscription. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id

onesignal_delete_user

Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id

onesignal_end_live_activity

Stop Live Activity Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
activity_idstringYesLive Activity record ID
subscription_idstringYesSubscription ID

onesignal_export_events

Export CSV of Events Parameters:
ParameterTypeRequiredDefaultDescription
notification_idstringYesThe ID of the notification to export events from.
app_idstringYesThe ID of the app that the notification belongs to.

onesignal_export_players

Export CSV of Players Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe app ID that you want to export devices from
extra_fieldsstring[]NoAdditional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256.
last_active_sincestringNoExport all devices with a last_active timestamp greater than this time. Unixtime in seconds.
segment_namestringNoExport all devices belonging to the segment.

onesignal_fetch_aliases

Lists all Aliases for the User identified by :subscription_id. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id

onesignal_fetch_user

Returns the User’s properties, Aliases, and Subscriptions. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id

onesignal_fetch_user_identity

Lists all Aliases for the User identified by (:alias_label, :alias_id). Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id

onesignal_get_app

View an app Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesAn app id

onesignal_get_apps

View apps

onesignal_get_eligible_iams

Manifest of In-App Messages the Subscription is eligible to display by the SDK. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id

onesignal_get_notification

View notification Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
notification_idstringYesNotification Id

onesignal_get_notification_history

Notification History Parameters:
ParameterTypeRequiredDefaultDescription
notification_idstringYesThe “id” of the message found in the Notification object
app_idstringNoApp Id
emailstringNoThe email address you would like the report sent.
eventsstringNo-> “sent” - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have “sent” events recorded, but will show “clicked” events. “clicked” - All the devices by player_id that clicked the specified notification_id.

onesignal_get_notifications

View notifications Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe app ID that you want to view notifications from
limitintegerNoHow many notifications to return. Max is 50. Default is 50.
offsetintegerNoPage offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
kindintegerNoKind of notifications returned: * unset - All notification types (default) * 0 - Dashboard only * 1 - API only * 3 - Automated only

onesignal_get_outcomes

View Outcomes Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
outcome_namesstringYesRequired Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the “os” prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
outcome_names[]stringNoOptional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where “Sales, Purchase” is the custom outcomes with a comma in the name.
outcome_time_rangestringNoOptional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted.
outcome_platformsstringNoOptional Platform id. Refer device’s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
outcome_attributionstringNoOptional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.

onesignal_get_player

View device Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesYour app_id for this device
player_idstringYesPlayer’s OneSignal ID
email_auth_hashstringNoEmail - Only required if you have enabled Identity Verification and device_type is email (11).

onesignal_get_players

View devices Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe app ID that you want to view players from
limitintegerNoHow many devices to return. Max is 300. Default is 300
offsetintegerNoResult offset. Default is 0. Results are sorted by id;

onesignal_identify_user_by_alias

Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id
identityobjectNoThe identity value

onesignal_identify_user_by_subscription_id

Upserts one or more Aliases for the User identified by :subscription_id. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id
identityobjectNoThe identity value

onesignal_transfer_subscription

Transfers this Subscription to the User identified by the identity in the payload. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id
identityobjectNoThe identity value

onesignal_update_app

Update an app Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesAn app id
additional_data_is_root_payloadbooleanNoiOS: Notification data (additional data) values will be added to the root of the apns payload when sent to the device. Ignore if you’re not using any other plugins, or not using OneSignal SDK methods to read the payload.
android_gcm_sender_idstringNoAndroid: Your Google Project number. Also known as Sender ID.
apns_bundle_idstringNoiOS: Required if using p8. Bundle ID for your app in the Apple ecosystem.
apns_certificatesstringNoApns Certificates
apns_envstringNoiOS: Either sandbox or production
apns_key_idstringNoiOS: Required if using p8. Unique identifier for the p8 authentication key.
apns_p12stringNoiOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded.
apns_p12_passwordstringNoiOS: Required if using p12 certificate. Password for the apns_p12 file.
apns_p8stringNoiOS: Required if using p8. Base64 encoded p8 key
apns_team_idstringNoiOS: Required if using p8. Team ID generated by Apple for your developer account.
basic_auth_keystringNoBasic Auth Key
chrome_keystringNoNot for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions.
chrome_web_default_notification_iconstringNoChrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80.
chrome_web_originstringNoChrome (All Browsers except Safari) (Recommended): The URL to your website. This field is required if you wish to enable web push and specify other web push parameters.
chrome_web_sub_domainstringNoChrome (All Browsers except Safari): A subdomain of your choice in order to support Web Push on non-HTTPS websites. This field must be set in order for the chrome_web_gcm_sender_id property to be processed.
created_atstringNoCreated At
gcm_keystringNoAndroid: Your Google Push Messaging Auth Key
idstringNoThe id value
messageable_playersintegerNoMessageable Players
namestringNoThe name of your app, as displayed on your apps list on the dashboard. This can be renamed.
organization_idstringNoThe Id of the Organization you would like to add this app to.
playersintegerNoThe players value
safari_apns_certificatesstringNoSafari Apns Certificates
safari_apns_p12stringNoSafari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded.
safari_apns_p12_passwordstringNoSafari: Password for safari_apns_p12 file
safari_icon_128_128stringNoSafari Icon 128 128
safari_icon_16_16stringNoSafari Icon 16 16
safari_icon_256_256stringNoSafari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide.
safari_icon_32_32stringNoSafari Icon 32 32
safari_icon_64_64stringNoSafari Icon 64 64
safari_push_idstringNoSafari Push Id
safari_site_originstringNoSafari (Recommended): The hostname to your website including http(s)://
site_namestringNoAll Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it.
updated_atstringNoUpdated At

onesignal_update_live_activity

Update a Live Activity via Push Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID for your app. Available in Keys & IDs.
activity_idstringYesLive Activity record ID
dismiss_atnumberNoTimestamp; only allowed if event is “end”
eventstringYesThe event value
event_updatesobjectYesEvent Updates
namestringYesType of live activity

onesignal_update_player

Edit device Parameters:
ParameterTypeRequiredDefaultDescription
player_idstringYesPlayer’s OneSignal ID
ad_idstringNoThe ad id for the device’s platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId
amount_spentnumberNoAmount the user has spent in USD, up to two decimal places
app_idstringNoApp Id
badge_countintegerNoCurrent iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client.
countrystringNoCountry code in the ISO 3166-1 Alpha 2 format
created_atintegerNoUnixtime when the player joined the game
device_modelstringNoDevice make and model. Example: iPhone5,1
device_osstringNoDevice operating system version. Example: 7.0.4
device_typeintegerYesRequired The device’s platform: 0 = iOS 1 = Android 2 = Amazon 3 = WindowsPhone (MPNS) 4 = Chrome Apps / Extensions 5 = Chrome Web Push 6 = Windows (WNS) 7 = Safari 8 = Firefox 9 = MacOS 10 = Alexa 11 = Email 13 = For Huawei App Gallery Builds SDK Setup. Not for Huawei Devices using FCM 14 = SMS
email_auth_hashstringNoEmail - Only required if you have enabled Identity Verification and device_type is email (11).
external_user_idstringNoa custom user ID
external_user_id_auth_hashstringNoOnly required if you have enabled Identity Verification and device_type is NOT 11 email.
game_versionstringNoVersion of your app. Example: 1.1
idstringNoThe device’s OneSignal ID
identifierstringNoRecommended: For Push Notifications, this is the Push Token Identifier from Google or Apple. For Apple Push identifiers, you must strip all non alphanumeric characters. Examples: iOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0 Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV… For Email Addresses, set the full email address email@email.com and make sure to set device_type to 11.
invalid_identifierbooleanNoIf true, this is the equivalent of a user being Unsubscribed
languagestringNoLanguage code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en
last_activeintegerNoUnixtime when the player was last active
latnumberNoLatitude of the device, used for geotagging to segment on.
longnumberNoLongitude of the device, used for geotagging to segment on.
notification_typesintegerNo1 = subscribed -2 = unsubscribed iOS - These values are set each time the user opens the app from the SDK. Use the SDK function set Subscription instead. Android - You may set this but you can no longer use the SDK method setSubscription later in your app as it will create synchronization issues.
playtimeintegerNoSeconds player was running your app.
sdkstringNoName and version of the sdk/plugin that’s calling this API method (if any)
session_countintegerNoNumber of times the user has played the game, defaults to 1
tagsobjectNoCustom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {“foo”:“bar”,“this”:“that”} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM
test_typeintegerNoThis is used in deciding whether to use your iOS Sandbox or Production push certificate when sending a push when both have been uploaded. Set to the iOS provisioning profile that was used to build your app. 1 = Development 2 = Ad-Hoc Omit this field for App Store builds.
timezoneintegerNoNumber of seconds away from UTC. Example: -28800

onesignal_update_player_tags

Edit tags with external user id Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesThe OneSignal App ID the user record is found under.
external_user_idstringYesThe External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
tagsobjectNoCustom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. Example &#123;"foo":"bar","this":"that"&#125;. Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM

onesignal_update_subscription

Updates an existing Subscription’s properties. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
subscription_idstringYesSubscription Id
subscriptionobjectNoThe subscription value

onesignal_update_user

Updates an existing User’s properties. Parameters:
ParameterTypeRequiredDefaultDescription
app_idstringYesApp Id
alias_labelstringYesAlias Label
alias_idstringYesAlias Id
deltasobjectNoThe deltas value
propertiesobjectNoThe properties value
refresh_device_metadatabooleanNoRefresh Device Metadata