You're Viewing User Model Beta Documentation 🎉
OneSignal is in the process of migrating from a device-centric model (player ID) to a new user-centric data model (OneSignal ID). In the new user-centric world, Users have a OneSignal ID, and what was the player ID is now known as the Subscription ID.
To learn more, check out the User Model Beta Overview.
Please refer to Version 9 of our documentation for device-centric information.
Create a new subscription for the user identified by the
alias_id in the path parameters.
onesignal_id can be used as a special
alias_label, with the UUID as the
A subscription is uniquely identified by its device
token pair. If the given
(type, token) pair exists on an existing subscription, that subscription will be transferred to this User.
201: a new Subscription was created
202: an existing Subscription was transferred to this User
Response object fields:
|The OneSignal Subscription ID (UUID)
|The OneSignal Application ID (UUID)
|The subscription types. Will be one of the following:
|This field has a different the subscription type.
For push subscriptions the token is the push token, for email subscriptions the token is the email address, for SMS subscriptions the token is the phone number
|Whether this subscription enabled or not
|For internal use only
|Total session duration in seconds
|The number of times a subscription has visited the app or site
|The OneSignal SDK version installed on the subscription device
|The subscription device make and model
|The subscription device operating system version
|Whether the device is rooted or not
|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 & Test Flight builds.
|The client application version
|The device network type.
net_type: 0 = wifi
net_type: 1 = cellular
|The cellular carrier
|Web only authorization key
|Web only p256 key