Learn how to implement a custom user preference center in your app or website using OneSignal APIs to manage notification topics, frequencies, channels, and data privacy settings.
external_id
or a custom alias you set. This will provide you the user properties
and subscriptions
. Helpful data includes but not limited to:
properties
: the user data
tags
- custom data you send to OneSignallanguage
- the language code for the usersubscriptions
: the messaging channels and subscription status
id
- the Subscription IDtype
- Email
, SMS
, *Push (AndroidPush
, iOSPush
, ChromePush
, SafariPush
, etc)enabled
- true
means subscribed, false
means unsubscribedtoken
- the push token, email address, or phone number depending on the subscription typesports: 1
) or set frequency tags like newsletter-frequency: weekly
. Use this data in Segments or the Create notification API with filters.
To update a tag, call the Update user API.
subscriptions
for type and enabled status. Show token
only for email/SMS, not for push.
addEmail
, addSms
SDK methods or Create subscription and Update subscription APIs. Subscription id
is required for updates.
enabled
to false
. Toggle to true
to opt-in again.