OneSignal

FREE
By dimashirokov
Updated 10 months ago
Communication
0.2/10
Popularity
57958ms
Latency
-
Success Rate

OneSignal API Documentation

Add push notification service to websites and apps.

View API Details
POSTaddDevice
POSTaddDevicePurchase
POSTcancelNotification
POSTcreateApp
POSTcreateDeviceSession
POSTeditDevice
POSTgetApp
POSTgetApps
POSTgetDevice
POSTgetDevices
POSTgetNotification
POSTgetNotifications
POSTnotificationTest
POSTsendNotification
POSTtrackNotificationOpen
POSTupdateApp
POSTupdateDeviceSessionLength
POSTeditDevice

Update an existing device in one of your OneSignal apps

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
appIdCREDENTIALS
REQUIREDRequired: Your app id for this device.
appIdCREDENTIALS
REQUIREDRequired: Your app id for this device.
deviceIdSTRING
REQUIREDRequired: The device's OneSignal ID.
deviceIdSTRING
REQUIREDRequired: The device's OneSignal ID.
appIdCREDENTIALS
REQUIREDRequired: Your app id for this device.
appIdCREDENTIALS
REQUIREDRequired: Your app id for this device.
deviceIdSTRING
REQUIREDRequired: The device's OneSignal ID.
Optional Parameters
languageSTRING
OPTIONALOptional: Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: `en`.
gameVersionSTRING
OPTIONALOptional: Version of your app. Example: `1.1`.
deviceOsSTRING
OPTIONALOptional: Device operating system version. Example: `7.0.4`.
adIdSTRING
OPTIONALOptional: The ad id for the device's platform: Android = `Advertising Id`; iOS = `identifierForVendor`; WP8.0 = `DeviceUniqueId`; WP8.1 = `AdvertisingId`.
sdkSTRING
OPTIONALOptional: Name and version of the plugin that's calling this API method (if any).
sessionCountNUMBER
OPTIONALOptional: Number of times the user has played the game, defaults to 1.
playtimeNUMBER
OPTIONALOptional: Unixtime when the player joined the game.
testTypeSELECT
OPTIONALOptional: 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.
notificationTypesSELECT
OPTIONALOptional: `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.
identifierSTRING
OPTIONALOptional: Push notification identifier from Google or Apple. For Apple push identifiers, you must strip all non alphanumeric characters. Example: `ce777617da7f548fe7a9ab6febb56`.
gameVersionSTRING
OPTIONALOptional: Version of your app. Example: `1.1`.
adIdSTRING
OPTIONALOptional: The ad id for the device's platform: Android = `Advertising Id`; iOS = `identifierForVendor`; WP8.0 = `DeviceUniqueId`; WP8.1 = `AdvertisingId`.
amountSpentSTRING
OPTIONALOptional: Amount the user has spent in USD, up to two decimal places.
playtimeNUMBER
OPTIONALOptional: Unixtime when the player joined the game.
createdAtDATEPICKER
OPTIONALOptional: Unixtime when the player joined the game.
badgeCountNUMBER
OPTIONALOptional: Current iOS badge count displayed on the app icon.
lastActiveDATEPICKER
OPTIONALOptional: Unixtime when the player was last active.
coordinatesMAP
OPTIONALOptional: Latitude and Longitude of the device, used for geotagging to segment on. Example: 51.514084206610455, -51.514084206610455
gameVersionSTRING
OPTIONALOptional: Version of your app. Example: `1.1`.
testTypeSELECT
OPTIONALOptional: 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.
badgeCountNUMBER
OPTIONALOptional: Current iOS badge count displayed on the app icon.
tagsJSON
OPTIONALOptional: Custom tags for the player. Only support string key value pairs. Does not support arrays or other nested objects. Example: `{"foo":"bar","this":"that"}`.
playtimeNUMBER
OPTIONALOptional: Unixtime when the player joined the game.
languageSTRING
OPTIONALOptional: Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: `en`.
deviceOsSTRING
OPTIONALOptional: Device operating system version. Example: `7.0.4`.
sdkSTRING
OPTIONALOptional: Name and version of the plugin that's calling this API method (if any).
coordinatesMAP
OPTIONALOptional: Latitude and Longitude of the device, used for geotagging to segment on. Example: 51.514084206610455, -51.514084206610455
identifierSTRING
OPTIONALOptional: Push notification identifier from Google or Apple. For Apple push identifiers, you must strip all non alphanumeric characters. Example: `ce777617da7f548fe7a9ab6febb56`.
createdAtDATEPICKER
OPTIONALOptional: Unixtime when the player joined the game.
timezoneNUMBER
OPTIONALOptional: Number of seconds away from UTC. Example: `-28800`.
deviceModelSTRING
OPTIONALOptional: Device make and model. Example: `iPhone5,1`.
adIdSTRING
OPTIONALOptional: The ad id for the device's platform: Android = `Advertising Id`; iOS = `identifierForVendor`; WP8.0 = `DeviceUniqueId`; WP8.1 = `AdvertisingId`.
notificationTypesSELECT
OPTIONALOptional: `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.
amountSpentSTRING
OPTIONALOptional: Amount the user has spent in USD, up to two decimal places.
lastActiveDATEPICKER
OPTIONALOptional: Unixtime when the player was last active.
sessionCountNUMBER
OPTIONALOptional: Number of times the user has played the game, defaults to 1.
identifierSTRING
OPTIONALOptional: Push notification identifier from Google or Apple. For Apple push identifiers, you must strip all non alphanumeric characters. Example: `ce777617da7f548fe7a9ab6febb56`.
languageSTRING
OPTIONALOptional: Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: `en`.
timezoneNUMBER
OPTIONALOptional: Number of seconds away from UTC. Example: `-28800`.
deviceModelSTRING
OPTIONALOptional: Device make and model. Example: `iPhone5,1`.
sdkSTRING
OPTIONALOptional: Name and version of the plugin that's calling this API method (if any).
sessionCountNUMBER
OPTIONALOptional: Number of times the user has played the game, defaults to 1.
tagsJSON
OPTIONALOptional: Custom tags for the player. Only support string key value pairs. Does not support arrays or other nested objects. Example: `{"foo":"bar","this":"that"}`.
amountSpentSTRING
OPTIONALOptional: Amount the user has spent in USD, up to two decimal places.
createdAtDATEPICKER
OPTIONALOptional: Unixtime when the player joined the game.
lastActiveDATEPICKER
OPTIONALOptional: Unixtime when the player was last active.
coordinatesMAP
OPTIONALOptional: Latitude and Longitude of the device, used for geotagging to segment on. Example: 51.514084206610455, -51.514084206610455
Code Snippet
Install SDK
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication