/onesignal | Type: Application | PCID required: Yes
Tools
| Tool | Description |
|---|---|
onesignal_begin_live_activity | Start Live Activity |
onesignal_cancel_notification | Stop a scheduled or currently outgoing notification |
onesignal_create_app | Create an app |
onesignal_create_notification | Create notification |
onesignal_create_player | Add a device |
onesignal_create_segments | Create Segments |
onesignal_create_subscription | Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. |
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. |
onesignal_delete_alias | Deletes an alias by alias label |
onesignal_delete_player | Delete a user record |
onesignal_delete_segments | Delete Segments |
onesignal_delete_subscription | Deletes the Subscription. |
onesignal_delete_user | Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases |
onesignal_end_live_activity | Stop Live Activity |
onesignal_export_events | Export CSV of Events |
onesignal_export_players | Export CSV of Players |
onesignal_fetch_aliases | Lists all Aliases for the User identified by :subscription_id. |
onesignal_fetch_user | Returns the User’s properties, Aliases, and Subscriptions. |
onesignal_fetch_user_identity | Lists all Aliases for the User identified by (:alias_label, :alias_id). |
onesignal_get_app | View an app |
onesignal_get_apps | View apps |
onesignal_get_eligible_iams | Manifest of In-App Messages the Subscription is eligible to display by the SDK. |
onesignal_get_notification | View notification |
onesignal_get_notification_history | Notification History |
onesignal_get_notifications | View notifications |
onesignal_get_outcomes | View Outcomes |
onesignal_get_player | View device |
onesignal_get_players | View devices |
onesignal_identify_user_by_alias | Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). |
onesignal_identify_user_by_subscription_id | Upserts one or more Aliases for the User identified by :subscription_id. |
onesignal_transfer_subscription | Transfers this Subscription to the User identified by the identity in the payload. |
onesignal_update_app | Update an app |
onesignal_update_live_activity | Update a Live Activity via Push |
onesignal_update_player | Edit device |
onesignal_update_player_tags | Edit tags with external user id |
onesignal_update_subscription | Updates an existing Subscription’s properties. |
onesignal_update_user | Updates an existing User’s properties. |
onesignal_begin_live_activity
Start Live Activity Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
activity_id | string | Yes | — | Live Activity record ID |
push_token | string | Yes | — | Push Token |
subscription_id | string | Yes | — | Subscription Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"activity_id": {
"type": "string",
"description": "Live Activity record ID"
},
"push_token": {
"type": "string",
"description": "Push Token"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
}
},
"required": [
"PCID",
"app_id",
"activity_id",
"push_token",
"subscription_id"
]
}
onesignal_cancel_notification
Stop a scheduled or currently outgoing notification Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
notification_id | string | Yes | — | Notification Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"notification_id": {
"type": "string",
"description": "Notification Id"
}
},
"required": [
"PCID",
"app_id",
"notification_id"
]
}
onesignal_create_app
Create an app Parameters:| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
additional_data_is_root_payload | boolean | No | — | iOS: 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_id | string | No | — | Android: Your Google Project number. Also known as Sender ID. | |
apns_bundle_id | string | null | No | — | iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. |
apns_certificates | string | null | No | — | Apns Certificates |
apns_env | string | null | No | — | iOS: Either sandbox or production |
apns_key_id | string | null | No | — | iOS: Required if using p8. Unique identifier for the p8 authentication key. |
apns_p12 | string | No | — | iOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded. | |
apns_p12_password | string | No | — | iOS: Required if using p12 certificate. Password for the apns_p12 file. | |
apns_p8 | string | null | No | — | iOS: Required if using p8. Base64 encoded p8 key |
apns_team_id | string | null | No | — | iOS: Required if using p8. Team ID generated by Apple for your developer account. |
basic_auth_key | string | null | No | — | Basic Auth Key |
chrome_key | string | null | No | — | Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions. |
chrome_web_default_notification_icon | string | null | No | — | Chrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80. |
chrome_web_origin | string | null | No | — | Chrome (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_domain | string | null | No | — | Chrome (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_at | string | No | — | Created At | |
gcm_key | string | null | No | — | Android: Your Google Push Messaging Auth Key |
id | string | No | — | The id value | |
messageable_players | integer | No | — | Messageable Players | |
name | string | No | — | The name of your app, as displayed on your apps list on the dashboard. This can be renamed. | |
organization_id | string | No | — | The Id of the Organization you would like to add this app to. | |
players | integer | No | — | The players value | |
safari_apns_certificates | string | No | — | Safari Apns Certificates | |
safari_apns_p12 | string | No | — | Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded. | |
safari_apns_p12_password | string | No | — | Safari: Password for safari_apns_p12 file | |
safari_icon_128_128 | string | No | — | Safari Icon 128 128 | |
safari_icon_16_16 | string | No | — | Safari Icon 16 16 | |
safari_icon_256_256 | string | No | — | Safari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide. | |
safari_icon_32_32 | string | No | — | Safari Icon 32 32 | |
safari_icon_64_64 | string | No | — | Safari Icon 64 64 | |
safari_push_id | string | null | No | — | Safari Push Id |
safari_site_origin | string | null | No | — | Safari (Recommended): The hostname to your website including http(s):// |
site_name | string | null | No | — | All Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it. |
updated_at | string | No | — | Updated At |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"additional_data_is_root_payload": {
"type": "boolean",
"description": "iOS: 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_id": {
"type": "string",
"description": "Android: Your Google Project number. Also known as Sender ID."
},
"apns_bundle_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem."
},
"apns_certificates": {
"type": [
"string",
"null"
],
"description": "Apns Certificates"
},
"apns_env": {
"type": [
"string",
"null"
],
"description": "iOS: Either sandbox or production",
"enum": [
"sandbox",
"production"
]
},
"apns_key_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Unique identifier for the p8 authentication key."
},
"apns_p12": {
"type": "string",
"description": "iOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded."
},
"apns_p12_password": {
"type": "string",
"description": "iOS: Required if using p12 certificate. Password for the apns_p12 file."
},
"apns_p8": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Base64 encoded p8 key"
},
"apns_team_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Team ID generated by Apple for your developer account."
},
"basic_auth_key": {
"type": [
"string",
"null"
],
"description": "Basic Auth Key"
},
"chrome_key": {
"type": [
"string",
"null"
],
"description": "Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions."
},
"chrome_web_default_notification_icon": {
"type": [
"string",
"null"
],
"description": "Chrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80."
},
"chrome_web_origin": {
"type": [
"string",
"null"
],
"description": "Chrome (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_domain": {
"type": [
"string",
"null"
],
"description": "Chrome (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_at": {
"type": "string",
"description": "Created At"
},
"gcm_key": {
"type": [
"string",
"null"
],
"description": "Android: Your Google Push Messaging Auth Key"
},
"id": {
"type": "string",
"description": "The id value"
},
"messageable_players": {
"type": "integer",
"description": "Messageable Players"
},
"name": {
"type": "string",
"description": "The name of your app, as displayed on your apps list on the dashboard. This can be renamed."
},
"organization_id": {
"type": "string",
"description": "The Id of the Organization you would like to add this app to."
},
"players": {
"type": "integer",
"description": "The players value"
},
"safari_apns_certificates": {
"type": "string",
"description": "Safari Apns Certificates"
},
"safari_apns_p12": {
"type": "string",
"description": "Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded."
},
"safari_apns_p12_password": {
"type": "string",
"description": "Safari: Password for safari_apns_p12 file"
},
"safari_icon_128_128": {
"type": "string",
"description": "Safari Icon 128 128"
},
"safari_icon_16_16": {
"type": "string",
"description": "Safari Icon 16 16"
},
"safari_icon_256_256": {
"type": "string",
"description": "Safari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide."
},
"safari_icon_32_32": {
"type": "string",
"description": "Safari Icon 32 32"
},
"safari_icon_64_64": {
"type": "string",
"description": "Safari Icon 64 64"
},
"safari_push_id": {
"type": [
"string",
"null"
],
"description": "Safari Push Id"
},
"safari_site_origin": {
"type": [
"string",
"null"
],
"description": "Safari (Recommended): The hostname to your website including http(s)://"
},
"site_name": {
"type": [
"string",
"null"
],
"description": "All Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it."
},
"updated_at": {
"type": "string",
"description": "Updated At"
}
},
"required": [
"PCID"
]
}
onesignal_create_notification
Create notification Parameters:| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
adm_big_picture | string | null | No | — | Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL. |
adm_group | string | null | No | — | Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android’s Notification Grouping feature. |
adm_group_message | object | No | — | Channel: 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_icon | string | null | No | — | Channel: 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_icon | string | null | No | — | Channel: 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_sound | string | null | No | — | Channel: 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” |
aggregation | string | No | — | The aggregation value | |
android_accent_color | string | null | No | — | Channel: 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_layout | object | No | — | Channel: 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_id | string | No | — | Channel: 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_group | string | null | No | — | Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android’s Notification Grouping feature. |
android_group_message | string | null | No | — | Channel: 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_color | string | null | No | — | Channel: 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_sound | string | null | No | — | Channel: 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_visibility | integer | null | No | — | Channel: 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_alert | object | No | — | Channel: 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_override | string | No | — | Channel: 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_id | string | Yes | — | Required: 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_url | string | null | No | — | Channel: 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_picture | string | null | No | — | Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL. |
buttons | object[] | No | — | Channel: 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_ids | string | No | — | Indicates 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_picture | string | null | No | — | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. |
chrome_icon | string | null | No | — | Channel: 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_badge | string | null | No | — | Channel: 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_icon | string | null | No | — | Channel: 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_image | string | null | No | — | Channel: 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_id | string | No | — | Channel: 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_available | boolean | null | No | — | Channel: 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. |
contents | object | No | — | The contents value | |
custom_data | object | No | — | Channel: 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} | |
data | object | No | — | Channel: 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_option | string | null | No | — | Channel: 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_day | string | null | No | — | Channel: All Use with delayed_option=timezone. Examples: “9:00AM” “21:45” “9:45:30” |
email_body | string | No | — | Channel: 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_address | string | null | No | — | Channel: 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_name | string | null | No | — | Channel: Email The name the email is from. If not specified, will default to “from name” set in the OneSignal Dashboard Email Settings. |
email_preheader | string | null | No | — | Channel: 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_subject | string | null | No | — | Channel: Email Required. The subject of the email. |
excluded_segments | string[] | No | — | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [“Active Users”, “Inactive Users”] | |
existing_android_channel_id | string | No | — | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | |
external_id | string | null | No | — | Correlation 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 |
filters | object[] | No | — | The filters value | |
firefox_icon | string | null | No | — | Channel: 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. |
headings | object | No | — | The headings value | |
huawei_accent_color | string | null | No | — | Channel: 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_picture | string | null | No | — | Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL. |
huawei_channel_id | string | null | No | — | Channel: 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_id | string | null | No | — | Channel: 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_icon | string | null | No | — | Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons |
huawei_led_color | string | null | No | — | Channel: 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_type | string | null | No | — | Channel: 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_icon | string | null | No | — | Channel: 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_sound | string | null | No | — | Channel: 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_visibility | integer | null | No | — | Channel: 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) |
id | string | No | — | The id value | |
include_aliases | object | No | — | Include Aliases | |
include_amazon_reg_ids | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV… Limit of 2,000 entries per REST API call | |
include_android_reg_ids | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_… Limit of 2,000 entries per REST API call | |
include_chrome_reg_ids | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_… Limit of 2,000 entries per REST API call | |
include_chrome_web_reg_ids | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_… Limit of 2,000 entries per REST API call | |
include_email_tokens | string[] | No | — | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | |
include_external_user_ids | string[] | No | — | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [“custom-id-assigned-by-api”] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | |
include_ios_tokens | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203… Limit of 2,000 entries per REST API call | |
include_phone_numbers | string[] | No | — | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | |
include_player_ids | string[] | No | — | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [“1dd608f2-c6a1-11e3-851d-000c2940e62c”] Limit of 2,000 entries per REST API call | |
include_unsubscribed | boolean | No | — | Channel: 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. | |
include_wp_wns_uris | string[] | No | — | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | |
included_segments | string[] | No | — | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [“Active Users”, “Inactive Users”] | |
ios_attachments | object | No | — | Channel: 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”} | |
ios_badgeCount | integer | null | No | — | Channel: 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_badgeType | string | null | No | — | Channel: 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_category | string | null | No | — | Channel: 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_sound | string | null | No | — | Channel: 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” |
isAdm | boolean | null | No | — | Indicates whether to send to all devices registered under your app’s Amazon Fire platform. |
isAndroid | boolean | null | No | — | Indicates whether to send to all devices registered under your app’s Google Android platform. |
isAnyWeb | boolean | null | No | — | Indicates 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. |
isChrome | boolean | null | No | — | This 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. |
isChromeWeb | boolean | null | No | — | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. |
isFirefox | boolean | null | No | — | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. |
isHuawei | boolean | null | No | — | Indicates whether to send to all devices registered under your app’s Huawei Android platform. |
isIos | boolean | null | No | — | Indicates whether to send to all devices registered under your app’s Apple iOS platform. |
isSafari | boolean | null | No | — | Does 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_WNS | boolean | null | No | — | Indicates whether to send to all devices registered under your app’s Windows platform. |
large_icon | string | null | No | — | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons |
mutable_content | boolean | No | — | Channel: 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. | |
name | string | null | No | — | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. |
priority | integer | null | No | — | Channel: 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_after | string | null | No | — | Channel: 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_icon | string | null | No | — | Channel: 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_from | string | null | No | — | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. |
sms_media_urls | string[] | No | — | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | |
subtitle | object | No | — | The subtitle value | |
summary_arg | string | No | — | Channel: 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_count | integer | No | — | Channel: 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_channel | string | No | — | Target Channel | |
target_content_identifier | string | null | No | — | Channel: 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_id | string | null | No | — | Channel: 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_id | string | null | No | — | Channel: 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_minute | string | null | No | — | Channel: 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. |
ttl | integer | null | No | — | Channel: 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). |
url | string | null | No | — | Channel: 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 |
value | integer | No | — | The value value | |
web_buttons | object[] | No | — | Channel: 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_topic | string | null | No | — | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. |
web_url | string | null | No | — | Channel: 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_sound | string | null | No | — | Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: “notification.wav” |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"adm_big_picture": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL."
},
"adm_group": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature."
},
"adm_group_message": {
"type": "object",
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_sound": {
"type": [
"string",
"null"
],
"description": "Channel: 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\""
},
"aggregation": {
"type": "string",
"description": "The aggregation value",
"enum": [
"sum",
"count"
]
},
"android_accent_color": {
"type": [
"string",
"null"
],
"description": "Channel: 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_layout": {
"type": "object",
"description": "Channel: 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.",
"properties": {
"image": {
"type": "string",
"description": "Asset file, android resource name, or URL to remote image."
},
"headings_color": {
"type": "string",
"description": "Title text color ARGB Hex format. Example(Blue) \"FF0000FF\"."
},
"contents_color": {
"type": "string",
"description": "Body text color ARGB Hex format. Example(Red) \"FFFF0000\"."
}
}
},
"android_channel_id": {
"type": "string",
"description": "Channel: 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_group": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature."
},
"android_group_message": {
"type": [
"string",
"null"
],
"description": "Channel: 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_color": {
"type": [
"string",
"null"
],
"description": "Channel: 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_sound": {
"type": [
"string",
"null"
],
"description": "Channel: 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_visibility": {
"type": [
"integer",
"null"
],
"description": "Channel: 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_alert": {
"type": "object",
"description": "Channel: 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_override": {
"type": "string",
"description": "Channel: 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_id": {
"type": "string",
"description": "Required: 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_url": {
"type": [
"string",
"null"
],
"description": "Channel: 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_picture": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL."
},
"buttons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id value"
},
"text": {
"type": "string",
"description": "The text value"
},
"icon": {
"type": "string",
"description": "The icon value"
}
},
"required": [
"id"
]
},
"description": "Channel: 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_ids": {
"type": "string",
"description": "Indicates 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_picture": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL."
},
"chrome_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_badge": {
"type": [
"string",
"null"
],
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_image": {
"type": [
"string",
"null"
],
"description": "Channel: 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_id": {
"type": "string",
"description": "Channel: 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_available": {
"type": [
"boolean",
"null"
],
"description": "Channel: 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."
},
"contents": {
"description": "The contents value"
},
"custom_data": {
"type": "object",
"description": "Channel: 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}"
},
"data": {
"type": "object",
"description": "Channel: 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_option": {
"type": [
"string",
"null"
],
"description": "Channel: 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_day": {
"type": [
"string",
"null"
],
"description": "Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\""
},
"email_body": {
"type": "string",
"description": "Channel: 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_address": {
"type": [
"string",
"null"
],
"description": "Channel: 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_name": {
"type": [
"string",
"null"
],
"description": "Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings."
},
"email_preheader": {
"type": [
"string",
"null"
],
"description": "Channel: 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_subject": {
"type": [
"string",
"null"
],
"description": "Channel: Email Required. The subject of the email."
},
"excluded_segments": {
"type": "array",
"items": {
"type": "string"
},
"description": "Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"]"
},
"existing_android_channel_id": {
"type": "string",
"description": "Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code."
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Correlation 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"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Name of the field to use as the first operand in the filter expression."
},
"key": {
"type": "string",
"description": "If `field` is `tag`, this field is *required* to specify `key` inside the tags."
},
"value": {
"type": "string",
"description": "Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator."
},
"relation": {
"type": "string",
"enum": [
">",
"<",
"=",
"!=",
"exists",
"not_exists",
"time_elapsed_gt",
"time_elapsed_lt"
],
"description": "Operator of a filter expression."
}
},
"required": [
"field",
"relation"
]
},
"description": "The filters value"
},
"firefox_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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."
},
"headings": {
"description": "The headings value"
},
"huawei_accent_color": {
"type": [
"string",
"null"
],
"description": "Channel: 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_picture": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL."
},
"huawei_channel_id": {
"type": [
"string",
"null"
],
"description": "Channel: 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_id": {
"type": [
"string",
"null"
],
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons"
},
"huawei_led_color": {
"type": [
"string",
"null"
],
"description": "Channel: 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_type": {
"type": [
"string",
"null"
],
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_sound": {
"type": [
"string",
"null"
],
"description": "Channel: 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_visibility": {
"type": [
"integer",
"null"
],
"description": "Channel: 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)"
},
"id": {
"type": "string",
"description": "The id value"
},
"include_aliases": {
"type": "object",
"description": "Include Aliases",
"properties": {
"alias_label": {
"type": "array",
"items": {
"type": "string"
},
"description": "Alias Label"
}
}
},
"include_amazon_reg_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call"
},
"include_android_reg_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call"
},
"include_chrome_reg_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call"
},
"include_chrome_web_reg_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call"
},
"include_email_tokens": {
"type": "array",
"items": {
"type": "string"
},
"description": "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call"
},
"include_external_user_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms."
},
"include_ios_tokens": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call"
},
"include_phone_numbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call"
},
"include_player_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call"
},
"include_unsubscribed": {
"type": "boolean",
"description": "Channel: 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."
},
"include_wp_wns_uris": {
"type": "array",
"items": {
"type": "string"
},
"description": "Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call"
},
"included_segments": {
"type": "array",
"items": {
"type": "string"
},
"description": "The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"]"
},
"ios_attachments": {
"type": "object",
"description": "Channel: 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\"}"
},
"ios_badgeCount": {
"type": [
"integer",
"null"
],
"description": "Channel: 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_badgeType": {
"type": [
"string",
"null"
],
"description": "Channel: 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_category": {
"type": [
"string",
"null"
],
"description": "Channel: 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_sound": {
"type": [
"string",
"null"
],
"description": "Channel: 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\""
},
"isAdm": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all devices registered under your app's Amazon Fire platform."
},
"isAndroid": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all devices registered under your app's Google Android platform."
},
"isAnyWeb": {
"type": [
"boolean",
"null"
],
"description": "Indicates 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."
},
"isChrome": {
"type": [
"boolean",
"null"
],
"description": "This 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."
},
"isChromeWeb": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform."
},
"isFirefox": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform."
},
"isHuawei": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all devices registered under your app's Huawei Android platform."
},
"isIos": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all devices registered under your app's Apple iOS platform."
},
"isSafari": {
"type": [
"boolean",
"null"
],
"description": "Does 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_WNS": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether to send to all devices registered under your app's Windows platform."
},
"large_icon": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons"
},
"mutable_content": {
"type": "boolean",
"description": "Channel: 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."
},
"name": {
"type": [
"string",
"null"
],
"description": "Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user."
},
"priority": {
"type": [
"integer",
"null"
],
"description": "Channel: 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_after": {
"type": [
"string",
"null"
],
"description": "Channel: 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_icon": {
"type": [
"string",
"null"
],
"description": "Channel: 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_from": {
"type": [
"string",
"null"
],
"description": "Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format."
},
"sms_media_urls": {
"type": "array",
"items": {
"type": "string"
},
"description": "Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs."
},
"subtitle": {
"description": "The subtitle value"
},
"summary_arg": {
"type": "string",
"description": "Channel: 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_count": {
"type": "integer",
"description": "Channel: 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_channel": {
"type": "string",
"description": "Target Channel",
"enum": [
"push",
"email",
"sms"
]
},
"target_content_identifier": {
"type": [
"string",
"null"
],
"description": "Channel: 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_id": {
"type": [
"string",
"null"
],
"description": "Channel: 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_id": {
"type": [
"string",
"null"
],
"description": "Channel: 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_minute": {
"type": [
"string",
"null"
],
"description": "Channel: 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."
},
"ttl": {
"type": [
"integer",
"null"
],
"description": "Channel: 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)."
},
"url": {
"type": [
"string",
"null"
],
"description": "Channel: 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"
},
"value": {
"type": "integer",
"description": "The value value"
},
"web_buttons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id value"
},
"text": {
"type": "string",
"description": "The text value"
},
"icon": {
"type": "string",
"description": "The icon value"
}
},
"required": [
"id"
]
},
"description": "Channel: 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_topic": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics."
},
"web_url": {
"type": [
"string",
"null"
],
"description": "Channel: 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_sound": {
"type": [
"string",
"null"
],
"description": "Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\""
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_create_player
Add a device Parameters:| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
ad_id | string | null | No | — | The ad id for the device’s platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId |
amount_spent | number | No | — | Amount the user has spent in USD, up to two decimal places | |
app_id | string | No | — | App Id | |
badge_count | integer | No | — | Current 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. | |
country | string | No | — | Country code in the ISO 3166-1 Alpha 2 format | |
created_at | integer | No | — | Unixtime when the player joined the game | |
device_model | string | null | No | — | Device make and model. Example: iPhone5,1 |
device_os | string | null | No | — | Device operating system version. Example: 7.0.4 |
device_type | integer | Yes | — | Required 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_hash | string | No | — | Email - Only required if you have enabled Identity Verification and device_type is email (11). | |
external_user_id | string | null | No | — | a custom user ID |
external_user_id_auth_hash | string | No | — | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | |
game_version | string | null | No | — | Version of your app. Example: 1.1 |
id | string | No | — | The device’s OneSignal ID | |
identifier | string | null | No | — | Recommended: 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_identifier | boolean | No | — | If true, this is the equivalent of a user being Unsubscribed | |
language | string | No | — | Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en | |
last_active | integer | No | — | Unixtime when the player was last active | |
lat | number | No | — | Latitude of the device, used for geotagging to segment on. | |
long | number | No | — | Longitude of the device, used for geotagging to segment on. | |
notification_types | integer | No | — | 1 = 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. | |
playtime | integer | No | — | Seconds player was running your app. | |
sdk | string | null | No | — | Name and version of the sdk/plugin that’s calling this API method (if any) |
session_count | integer | No | — | Number of times the user has played the game, defaults to 1 | |
tags | object | No | — | Custom 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_type | integer | null | No | — | This 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. |
timezone | integer | null | No | — | Number of seconds away from UTC. Example: -28800 |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"ad_id": {
"type": [
"string",
"null"
],
"description": "The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId"
},
"amount_spent": {
"type": "number",
"description": "Amount the user has spent in USD, up to two decimal places"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"badge_count": {
"type": "integer",
"description": "Current 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."
},
"country": {
"type": "string",
"description": "Country code in the ISO 3166-1 Alpha 2 format"
},
"created_at": {
"type": "integer",
"description": "Unixtime when the player joined the game"
},
"device_model": {
"type": [
"string",
"null"
],
"description": "Device make and model. Example: iPhone5,1"
},
"device_os": {
"type": [
"string",
"null"
],
"description": "Device operating system version. Example: 7.0.4"
},
"device_type": {
"type": "integer",
"description": "Required 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_hash": {
"type": "string",
"description": "Email - Only required if you have enabled Identity Verification and device_type is email (11)."
},
"external_user_id": {
"type": [
"string",
"null"
],
"description": "a custom user ID"
},
"external_user_id_auth_hash": {
"type": "string",
"description": "Only required if you have enabled Identity Verification and device_type is NOT 11 email."
},
"game_version": {
"type": [
"string",
"null"
],
"description": "Version of your app. Example: 1.1"
},
"id": {
"type": "string",
"description": "The device's OneSignal ID"
},
"identifier": {
"type": [
"string",
"null"
],
"description": "Recommended: 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_identifier": {
"type": "boolean",
"description": "If true, this is the equivalent of a user being Unsubscribed"
},
"language": {
"type": "string",
"description": "Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en"
},
"last_active": {
"type": "integer",
"description": "Unixtime when the player was last active"
},
"lat": {
"type": "number",
"description": "Latitude of the device, used for geotagging to segment on."
},
"long": {
"type": "number",
"description": "Longitude of the device, used for geotagging to segment on."
},
"notification_types": {
"type": "integer",
"description": "1 = 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."
},
"playtime": {
"type": "integer",
"description": "Seconds player was running your app."
},
"sdk": {
"type": [
"string",
"null"
],
"description": "Name and version of the sdk/plugin that's calling this API method (if any)"
},
"session_count": {
"type": "integer",
"description": "Number of times the user has played the game, defaults to 1"
},
"tags": {
"type": "object",
"description": "Custom 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_type": {
"type": [
"integer",
"null"
],
"description": "This 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."
},
"timezone": {
"type": [
"integer",
"null"
],
"description": "Number of seconds away from UTC. Example: -28800"
}
},
"required": [
"PCID",
"device_type"
]
}
onesignal_create_segments
Create Segments Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
filters | any[] | No | — | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. |
id | string | No | — | UUID of the segment. If left empty, it will be assigned automaticaly. |
name | string | No | — | Name of the segment. You’ll see this name on the Web UI. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"filters": {
"type": "array",
"description": "Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters."
},
"id": {
"type": "string",
"description": "UUID of the segment. If left empty, it will be assigned automaticaly."
},
"name": {
"type": "string",
"description": "Name of the segment. You'll see this name on the Web UI."
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_create_subscription
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
retain_previous_owner | boolean | No | — | Retain Previous Owner |
subscription | object | No | — | The subscription value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
},
"retain_previous_owner": {
"type": "boolean",
"description": "Retain Previous Owner"
},
"subscription": {
"type": "object",
"description": "The subscription value",
"properties": {
"id": {
"type": "string",
"description": "The id value"
},
"type": {
"type": "string",
"description": "The type value",
"enum": [
"iOSPush",
"AndroidPush",
"FireOSPush",
"ChromeExtensionPush",
"ChromePush",
"WindowsPush",
"SafariLegacyPush",
"FirefoxPush",
"macOSPush",
"HuaweiPush",
"SafariPush",
"Email",
"SMS"
]
},
"token": {
"type": "string",
"description": "The token value"
},
"enabled": {
"type": "boolean",
"description": "The enabled value"
},
"notification_types": {
"type": "number",
"description": "Notification Types"
},
"session_time": {
"type": "number",
"description": "Session Time"
},
"session_count": {
"type": "number",
"description": "Session Count"
},
"sdk": {
"type": "string",
"description": "The sdk value"
},
"device_model": {
"type": "string",
"description": "Device Model"
},
"device_os": {
"type": "string",
"description": "Device Os"
},
"rooted": {
"type": "boolean",
"description": "The rooted value"
},
"test_type": {
"type": "number",
"description": "Test Type"
},
"app_version": {
"type": "string",
"description": "App Version"
},
"net_type": {
"type": "number",
"description": "Net Type"
},
"carrier": {
"type": "string",
"description": "The carrier value"
},
"web_auth": {
"type": "string",
"description": "Web Auth"
},
"web_p256": {
"type": "string",
"description": "Web P256"
}
}
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}
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:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
identity | object | No | — | The identity value |
properties | object | No | — | The properties value |
subscription_options | object | No | — | Subscription Options |
subscriptions | object[] | No | — | The subscriptions value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"identity": {
"type": "object",
"description": "The identity value"
},
"properties": {
"type": "object",
"description": "The properties value",
"properties": {
"tags": {
"type": "object",
"description": "The tags value"
},
"language": {
"type": "string",
"description": "The language value"
},
"timezone_id": {
"type": "string",
"description": "Timezone Id"
},
"lat": {
"type": "number",
"description": "The lat value"
},
"long": {
"type": "number",
"description": "The long value"
},
"country": {
"type": "string",
"description": "The country value"
},
"first_active": {
"type": "number",
"description": "First Active"
},
"last_active": {
"type": "number",
"description": "Last Active"
},
"amount_spent": {
"type": "number",
"description": "Amount Spent"
},
"purchases": {
"type": "array",
"items": {
"type": "object"
},
"description": "The purchases value"
},
"ip": {
"type": "string",
"description": "The ip value"
}
}
},
"subscription_options": {
"type": "object",
"description": "Subscription Options",
"properties": {
"retain_previous_owner": {
"type": "boolean",
"description": "Retain Previous Owner"
}
}
},
"subscriptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id value"
},
"type": {
"type": "string",
"enum": [
"iOSPush",
"AndroidPush",
"FireOSPush",
"ChromeExtensionPush",
"ChromePush",
"WindowsPush",
"SafariLegacyPush",
"FirefoxPush",
"macOSPush",
"HuaweiPush",
"SafariPush",
"Email",
"SMS"
],
"description": "The type value"
},
"token": {
"type": "string",
"description": "The token value"
},
"enabled": {
"type": "boolean",
"description": "The enabled value"
},
"notification_types": {
"type": "number",
"description": "Notification Types"
},
"session_time": {
"type": "number",
"description": "Session Time"
},
"session_count": {
"type": "number",
"description": "Session Count"
},
"sdk": {
"type": "string",
"description": "The sdk value"
},
"device_model": {
"type": "string",
"description": "Device Model"
},
"device_os": {
"type": "string",
"description": "Device Os"
},
"rooted": {
"type": "boolean",
"description": "The rooted value"
},
"test_type": {
"type": "number",
"description": "Test Type"
},
"app_version": {
"type": "string",
"description": "App Version"
},
"net_type": {
"type": "number",
"description": "Net Type"
},
"carrier": {
"type": "string",
"description": "The carrier value"
},
"web_auth": {
"type": "string",
"description": "Web Auth"
},
"web_p256": {
"type": "string",
"description": "Web P256"
}
}
},
"description": "The subscriptions value"
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_delete_alias
Deletes an alias by alias label Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
alias_label_to_delete | string | Yes | — | Alias Label To Delete |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
},
"alias_label_to_delete": {
"type": "string",
"description": "Alias Label To Delete"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id",
"alias_label_to_delete"
]
}
onesignal_delete_player
Delete a user record Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
player_id | string | Yes | — | The OneSignal player_id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"player_id": {
"type": "string",
"description": "The OneSignal player_id"
}
},
"required": [
"PCID",
"app_id",
"player_id"
]
}
onesignal_delete_segments
Delete Segments Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
segment_id | string | Yes | — | The segment_id can be found in the URL of the segment when viewing it in the dashboard. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"segment_id": {
"type": "string",
"description": "The segment_id can be found in the URL of the segment when viewing it in the dashboard."
}
},
"required": [
"PCID",
"app_id",
"segment_id"
]
}
onesignal_delete_subscription
Deletes the Subscription. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_delete_user
Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}
onesignal_end_live_activity
Stop Live Activity Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
activity_id | string | Yes | — | Live Activity record ID |
subscription_id | string | Yes | — | Subscription ID |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"activity_id": {
"type": "string",
"description": "Live Activity record ID"
},
"subscription_id": {
"type": "string",
"description": "Subscription ID"
}
},
"required": [
"PCID",
"app_id",
"activity_id",
"subscription_id"
]
}
onesignal_export_events
Export CSV of Events Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
notification_id | string | Yes | — | The ID of the notification to export events from. |
app_id | string | Yes | — | The ID of the app that the notification belongs to. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"notification_id": {
"type": "string",
"description": "The ID of the notification to export events from."
},
"app_id": {
"type": "string",
"description": "The ID of the app that the notification belongs to."
}
},
"required": [
"PCID",
"notification_id",
"app_id"
]
}
onesignal_export_players
Export CSV of Players Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The app ID that you want to export devices from |
extra_fields | string[] | No | — | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. |
last_active_since | string | No | — | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. |
segment_name | string | No | — | Export all devices belonging to the segment. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The app ID that you want to export devices from"
},
"extra_fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256."
},
"last_active_since": {
"type": "string",
"description": "Export all devices with a last_active timestamp greater than this time. Unixtime in seconds."
},
"segment_name": {
"type": "string",
"description": "Export all devices belonging to the segment."
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_fetch_aliases
Lists all Aliases for the User identified by :subscription_id. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_fetch_user
Returns the User’s properties, Aliases, and Subscriptions. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}
onesignal_fetch_user_identity
Lists all Aliases for the User identified by (:alias_label, :alias_id). Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}
onesignal_get_app
View an app Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | An app id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "An app id"
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_get_apps
View appsShow inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
}
},
"required": [
"PCID"
]
}
onesignal_get_eligible_iams
Manifest of In-App Messages the Subscription is eligible to display by the SDK. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_get_notification
View notification Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
notification_id | string | Yes | — | Notification Id |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"notification_id": {
"type": "string",
"description": "Notification Id"
}
},
"required": [
"PCID",
"app_id",
"notification_id"
]
}
onesignal_get_notification_history
Notification History Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
notification_id | string | Yes | — | The “id” of the message found in the Notification object |
app_id | string | No | — | App Id |
email | string | No | — | The email address you would like the report sent. |
events | string | No | — | -> “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. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"notification_id": {
"type": "string",
"description": "The \"id\" of the message found in the Notification object"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"email": {
"type": "string",
"description": "The email address you would like the report sent."
},
"events": {
"type": "string",
"description": "-> \"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.",
"enum": [
"sent",
"clicked"
]
}
},
"required": [
"PCID",
"notification_id"
]
}
onesignal_get_notifications
View notifications Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The app ID that you want to view notifications from |
limit | integer | No | — | How many notifications to return. Max is 50. Default is 50. |
offset | integer | No | — | Page 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. |
kind | integer | No | — | Kind of notifications returned: * unset - All notification types (default) * 0 - Dashboard only * 1 - API only * 3 - Automated only |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The app ID that you want to view notifications from"
},
"limit": {
"type": "integer",
"description": "How many notifications to return. Max is 50. Default is 50."
},
"offset": {
"type": "integer",
"description": "Page 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."
},
"kind": {
"type": "integer",
"description": "Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only",
"enum": [
0,
1,
3
]
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_get_outcomes
View Outcomes Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
outcome_names | string | Yes | — | Required 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[] | string | No | — | Optional 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_range | string | No | — | Optional 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_platforms | string | No | — | Optional 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_attribution | string | No | — | Optional 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. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"outcome_names": {
"type": "string",
"description": "Required 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[]": {
"type": "string",
"description": "Optional 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_range": {
"type": "string",
"description": "Optional 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_platforms": {
"type": "string",
"description": "Optional 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_attribution": {
"type": "string",
"description": "Optional 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."
}
},
"required": [
"PCID",
"app_id",
"outcome_names"
]
}
onesignal_get_player
View device Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | Your app_id for this device |
player_id | string | Yes | — | Player’s OneSignal ID |
email_auth_hash | string | No | — | Email - Only required if you have enabled Identity Verification and device_type is email (11). |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "Your app_id for this device"
},
"player_id": {
"type": "string",
"description": "Player's OneSignal ID"
},
"email_auth_hash": {
"type": "string",
"description": "Email - Only required if you have enabled Identity Verification and device_type is email (11)."
}
},
"required": [
"PCID",
"app_id",
"player_id"
]
}
onesignal_get_players
View devices Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The app ID that you want to view players from |
limit | integer | No | — | How many devices to return. Max is 300. Default is 300 |
offset | integer | No | — | Result offset. Default is 0. Results are sorted by id; |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The app ID that you want to view players from"
},
"limit": {
"type": "integer",
"description": "How many devices to return. Max is 300. Default is 300"
},
"offset": {
"type": "integer",
"description": "Result offset. Default is 0. Results are sorted by id;"
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_identify_user_by_alias
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
identity | object | No | — | The identity value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
},
"identity": {
"type": "object",
"description": "The identity value"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}
onesignal_identify_user_by_subscription_id
Upserts one or more Aliases for the User identified by :subscription_id. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
identity | object | No | — | The identity value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
},
"identity": {
"type": "object",
"description": "The identity value"
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_transfer_subscription
Transfers this Subscription to the User identified by the identity in the payload. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
identity | object | No | — | The identity value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
},
"identity": {
"type": "object",
"description": "The identity value"
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_update_app
Update an app Parameters:| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
app_id | string | Yes | — | An app id | |
additional_data_is_root_payload | boolean | No | — | iOS: 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_id | string | No | — | Android: Your Google Project number. Also known as Sender ID. | |
apns_bundle_id | string | null | No | — | iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. |
apns_certificates | string | null | No | — | Apns Certificates |
apns_env | string | null | No | — | iOS: Either sandbox or production |
apns_key_id | string | null | No | — | iOS: Required if using p8. Unique identifier for the p8 authentication key. |
apns_p12 | string | No | — | iOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded. | |
apns_p12_password | string | No | — | iOS: Required if using p12 certificate. Password for the apns_p12 file. | |
apns_p8 | string | null | No | — | iOS: Required if using p8. Base64 encoded p8 key |
apns_team_id | string | null | No | — | iOS: Required if using p8. Team ID generated by Apple for your developer account. |
basic_auth_key | string | null | No | — | Basic Auth Key |
chrome_key | string | null | No | — | Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions. |
chrome_web_default_notification_icon | string | null | No | — | Chrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80. |
chrome_web_origin | string | null | No | — | Chrome (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_domain | string | null | No | — | Chrome (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_at | string | No | — | Created At | |
gcm_key | string | null | No | — | Android: Your Google Push Messaging Auth Key |
id | string | No | — | The id value | |
messageable_players | integer | No | — | Messageable Players | |
name | string | No | — | The name of your app, as displayed on your apps list on the dashboard. This can be renamed. | |
organization_id | string | No | — | The Id of the Organization you would like to add this app to. | |
players | integer | No | — | The players value | |
safari_apns_certificates | string | No | — | Safari Apns Certificates | |
safari_apns_p12 | string | No | — | Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded. | |
safari_apns_p12_password | string | No | — | Safari: Password for safari_apns_p12 file | |
safari_icon_128_128 | string | No | — | Safari Icon 128 128 | |
safari_icon_16_16 | string | No | — | Safari Icon 16 16 | |
safari_icon_256_256 | string | No | — | Safari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide. | |
safari_icon_32_32 | string | No | — | Safari Icon 32 32 | |
safari_icon_64_64 | string | No | — | Safari Icon 64 64 | |
safari_push_id | string | null | No | — | Safari Push Id |
safari_site_origin | string | null | No | — | Safari (Recommended): The hostname to your website including http(s):// |
site_name | string | null | No | — | All Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it. |
updated_at | string | No | — | Updated At |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "An app id"
},
"additional_data_is_root_payload": {
"type": "boolean",
"description": "iOS: 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_id": {
"type": "string",
"description": "Android: Your Google Project number. Also known as Sender ID."
},
"apns_bundle_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem."
},
"apns_certificates": {
"type": [
"string",
"null"
],
"description": "Apns Certificates"
},
"apns_env": {
"type": [
"string",
"null"
],
"description": "iOS: Either sandbox or production",
"enum": [
"sandbox",
"production"
]
},
"apns_key_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Unique identifier for the p8 authentication key."
},
"apns_p12": {
"type": "string",
"description": "iOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded."
},
"apns_p12_password": {
"type": "string",
"description": "iOS: Required if using p12 certificate. Password for the apns_p12 file."
},
"apns_p8": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Base64 encoded p8 key"
},
"apns_team_id": {
"type": [
"string",
"null"
],
"description": "iOS: Required if using p8. Team ID generated by Apple for your developer account."
},
"basic_auth_key": {
"type": [
"string",
"null"
],
"description": "Basic Auth Key"
},
"chrome_key": {
"type": [
"string",
"null"
],
"description": "Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions."
},
"chrome_web_default_notification_icon": {
"type": [
"string",
"null"
],
"description": "Chrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80."
},
"chrome_web_origin": {
"type": [
"string",
"null"
],
"description": "Chrome (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_domain": {
"type": [
"string",
"null"
],
"description": "Chrome (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_at": {
"type": "string",
"description": "Created At"
},
"gcm_key": {
"type": [
"string",
"null"
],
"description": "Android: Your Google Push Messaging Auth Key"
},
"id": {
"type": "string",
"description": "The id value"
},
"messageable_players": {
"type": "integer",
"description": "Messageable Players"
},
"name": {
"type": "string",
"description": "The name of your app, as displayed on your apps list on the dashboard. This can be renamed."
},
"organization_id": {
"type": "string",
"description": "The Id of the Organization you would like to add this app to."
},
"players": {
"type": "integer",
"description": "The players value"
},
"safari_apns_certificates": {
"type": "string",
"description": "Safari Apns Certificates"
},
"safari_apns_p12": {
"type": "string",
"description": "Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded."
},
"safari_apns_p12_password": {
"type": "string",
"description": "Safari: Password for safari_apns_p12 file"
},
"safari_icon_128_128": {
"type": "string",
"description": "Safari Icon 128 128"
},
"safari_icon_16_16": {
"type": "string",
"description": "Safari Icon 16 16"
},
"safari_icon_256_256": {
"type": "string",
"description": "Safari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide."
},
"safari_icon_32_32": {
"type": "string",
"description": "Safari Icon 32 32"
},
"safari_icon_64_64": {
"type": "string",
"description": "Safari Icon 64 64"
},
"safari_push_id": {
"type": [
"string",
"null"
],
"description": "Safari Push Id"
},
"safari_site_origin": {
"type": [
"string",
"null"
],
"description": "Safari (Recommended): The hostname to your website including http(s)://"
},
"site_name": {
"type": [
"string",
"null"
],
"description": "All Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it."
},
"updated_at": {
"type": "string",
"description": "Updated At"
}
},
"required": [
"PCID",
"app_id"
]
}
onesignal_update_live_activity
Update a Live Activity via Push Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID for your app. Available in Keys & IDs. |
activity_id | string | Yes | — | Live Activity record ID |
dismiss_at | number | No | — | Timestamp; only allowed if event is “end” |
event | string | Yes | — | The event value |
event_updates | object | Yes | — | Event Updates |
name | string | Yes | — | Type of live activity |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID for your app. Available in Keys & IDs."
},
"activity_id": {
"type": "string",
"description": "Live Activity record ID"
},
"dismiss_at": {
"type": "number",
"description": "Timestamp; only allowed if event is \"end\""
},
"event": {
"type": "string",
"description": "The event value",
"enum": [
"update",
"end"
]
},
"event_updates": {
"type": "object",
"description": "Event Updates"
},
"name": {
"type": "string",
"description": "Type of live activity",
"enum": [
"headings",
"contents",
"ios_sound",
"priority_level"
]
}
},
"required": [
"PCID",
"app_id",
"activity_id",
"event",
"event_updates",
"name"
]
}
onesignal_update_player
Edit device Parameters:| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
player_id | string | Yes | — | Player’s OneSignal ID | |
ad_id | string | null | No | — | The ad id for the device’s platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId |
amount_spent | number | No | — | Amount the user has spent in USD, up to two decimal places | |
app_id | string | No | — | App Id | |
badge_count | integer | No | — | Current 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. | |
country | string | No | — | Country code in the ISO 3166-1 Alpha 2 format | |
created_at | integer | No | — | Unixtime when the player joined the game | |
device_model | string | null | No | — | Device make and model. Example: iPhone5,1 |
device_os | string | null | No | — | Device operating system version. Example: 7.0.4 |
device_type | integer | Yes | — | Required 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_hash | string | No | — | Email - Only required if you have enabled Identity Verification and device_type is email (11). | |
external_user_id | string | null | No | — | a custom user ID |
external_user_id_auth_hash | string | No | — | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | |
game_version | string | null | No | — | Version of your app. Example: 1.1 |
id | string | No | — | The device’s OneSignal ID | |
identifier | string | null | No | — | Recommended: 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_identifier | boolean | No | — | If true, this is the equivalent of a user being Unsubscribed | |
language | string | No | — | Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en | |
last_active | integer | No | — | Unixtime when the player was last active | |
lat | number | No | — | Latitude of the device, used for geotagging to segment on. | |
long | number | No | — | Longitude of the device, used for geotagging to segment on. | |
notification_types | integer | No | — | 1 = 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. | |
playtime | integer | No | — | Seconds player was running your app. | |
sdk | string | null | No | — | Name and version of the sdk/plugin that’s calling this API method (if any) |
session_count | integer | No | — | Number of times the user has played the game, defaults to 1 | |
tags | object | No | — | Custom 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_type | integer | null | No | — | This 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. |
timezone | integer | null | No | — | Number of seconds away from UTC. Example: -28800 |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"player_id": {
"type": "string",
"description": "Player's OneSignal ID"
},
"ad_id": {
"type": [
"string",
"null"
],
"description": "The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId"
},
"amount_spent": {
"type": "number",
"description": "Amount the user has spent in USD, up to two decimal places"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"badge_count": {
"type": "integer",
"description": "Current 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."
},
"country": {
"type": "string",
"description": "Country code in the ISO 3166-1 Alpha 2 format"
},
"created_at": {
"type": "integer",
"description": "Unixtime when the player joined the game"
},
"device_model": {
"type": [
"string",
"null"
],
"description": "Device make and model. Example: iPhone5,1"
},
"device_os": {
"type": [
"string",
"null"
],
"description": "Device operating system version. Example: 7.0.4"
},
"device_type": {
"type": "integer",
"description": "Required 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_hash": {
"type": "string",
"description": "Email - Only required if you have enabled Identity Verification and device_type is email (11)."
},
"external_user_id": {
"type": [
"string",
"null"
],
"description": "a custom user ID"
},
"external_user_id_auth_hash": {
"type": "string",
"description": "Only required if you have enabled Identity Verification and device_type is NOT 11 email."
},
"game_version": {
"type": [
"string",
"null"
],
"description": "Version of your app. Example: 1.1"
},
"id": {
"type": "string",
"description": "The device's OneSignal ID"
},
"identifier": {
"type": [
"string",
"null"
],
"description": "Recommended: 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_identifier": {
"type": "boolean",
"description": "If true, this is the equivalent of a user being Unsubscribed"
},
"language": {
"type": "string",
"description": "Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en"
},
"last_active": {
"type": "integer",
"description": "Unixtime when the player was last active"
},
"lat": {
"type": "number",
"description": "Latitude of the device, used for geotagging to segment on."
},
"long": {
"type": "number",
"description": "Longitude of the device, used for geotagging to segment on."
},
"notification_types": {
"type": "integer",
"description": "1 = 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."
},
"playtime": {
"type": "integer",
"description": "Seconds player was running your app."
},
"sdk": {
"type": [
"string",
"null"
],
"description": "Name and version of the sdk/plugin that's calling this API method (if any)"
},
"session_count": {
"type": "integer",
"description": "Number of times the user has played the game, defaults to 1"
},
"tags": {
"type": "object",
"description": "Custom 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_type": {
"type": [
"integer",
"null"
],
"description": "This 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."
},
"timezone": {
"type": [
"integer",
"null"
],
"description": "Number of seconds away from UTC. Example: -28800"
}
},
"required": [
"PCID",
"player_id",
"device_type"
]
}
onesignal_update_player_tags
Edit tags with external user id Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | The OneSignal App ID the user record is found under. |
external_user_id | string | Yes | — | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. |
tags | object | No | — | Custom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. 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 ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "The OneSignal App ID the user record is found under."
},
"external_user_id": {
"type": "string",
"description": "The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated."
},
"tags": {
"type": "object",
"description": "Custom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. 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 ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM"
}
},
"required": [
"PCID",
"app_id",
"external_user_id"
]
}
onesignal_update_subscription
Updates an existing Subscription’s properties. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
subscription_id | string | Yes | — | Subscription Id |
subscription | object | No | — | The subscription value |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"subscription_id": {
"type": "string",
"description": "Subscription Id"
},
"subscription": {
"type": "object",
"description": "The subscription value",
"properties": {
"id": {
"type": "string",
"description": "The id value"
},
"type": {
"type": "string",
"description": "The type value",
"enum": [
"iOSPush",
"AndroidPush",
"FireOSPush",
"ChromeExtensionPush",
"ChromePush",
"WindowsPush",
"SafariLegacyPush",
"FirefoxPush",
"macOSPush",
"HuaweiPush",
"SafariPush",
"Email",
"SMS"
]
},
"token": {
"type": "string",
"description": "The token value"
},
"enabled": {
"type": "boolean",
"description": "The enabled value"
},
"notification_types": {
"type": "number",
"description": "Notification Types"
},
"session_time": {
"type": "number",
"description": "Session Time"
},
"session_count": {
"type": "number",
"description": "Session Count"
},
"sdk": {
"type": "string",
"description": "The sdk value"
},
"device_model": {
"type": "string",
"description": "Device Model"
},
"device_os": {
"type": "string",
"description": "Device Os"
},
"rooted": {
"type": "boolean",
"description": "The rooted value"
},
"test_type": {
"type": "number",
"description": "Test Type"
},
"app_version": {
"type": "string",
"description": "App Version"
},
"net_type": {
"type": "number",
"description": "Net Type"
},
"carrier": {
"type": "string",
"description": "The carrier value"
},
"web_auth": {
"type": "string",
"description": "Web Auth"
},
"web_p256": {
"type": "string",
"description": "Web P256"
}
}
}
},
"required": [
"PCID",
"app_id",
"subscription_id"
]
}
onesignal_update_user
Updates an existing User’s properties. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
app_id | string | Yes | — | App Id |
alias_label | string | Yes | — | Alias Label |
alias_id | string | Yes | — | Alias Id |
deltas | object | No | — | The deltas value |
properties | object | No | — | The properties value |
refresh_device_metadata | boolean | No | — | Refresh Device Metadata |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"app_id": {
"type": "string",
"description": "App Id"
},
"alias_label": {
"type": "string",
"description": "Alias Label"
},
"alias_id": {
"type": "string",
"description": "Alias Id"
},
"deltas": {
"type": "object",
"description": "The deltas value",
"properties": {
"session_time": {
"type": "number",
"description": "Session Time"
},
"session_count": {
"type": "number",
"description": "Session Count"
},
"purchases": {
"type": "array",
"items": {
"type": "object"
},
"description": "The purchases value"
}
}
},
"properties": {
"type": "object",
"description": "The properties value",
"properties": {
"tags": {
"type": "object",
"description": "The tags value"
},
"language": {
"type": "string",
"description": "The language value"
},
"timezone_id": {
"type": "string",
"description": "Timezone Id"
},
"lat": {
"type": "number",
"description": "The lat value"
},
"long": {
"type": "number",
"description": "The long value"
},
"country": {
"type": "string",
"description": "The country value"
},
"first_active": {
"type": "number",
"description": "First Active"
},
"last_active": {
"type": "number",
"description": "Last Active"
},
"amount_spent": {
"type": "number",
"description": "Amount Spent"
},
"purchases": {
"type": "array",
"items": {
"type": "object"
},
"description": "The purchases value"
},
"ip": {
"type": "string",
"description": "The ip value"
}
}
},
"refresh_device_metadata": {
"type": "boolean",
"description": "Refresh Device Metadata"
}
},
"required": [
"PCID",
"app_id",
"alias_label",
"alias_id"
]
}

