Update properties on an existing Subscription using its token. Commonly used to enable or disable subscription status when managing outside of the OneSignal SDK.
token and token_type and want to update metadata or status flags directly.token_type and the token.
The token_type is the Subscription’s type (e.g., Email, SMS, iOSPush, AndroidPush, etc.).
The token is the push token, email address, or phone number associated with the Subscription.
Ensure the token is valid and correctly formatted for the chosen token_type.
Your App API key with prefix Key. See Keys & IDs.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The subscription channel type. Must match the format of the token.
Email, SMS, iOSPush, AndroidPush, HuaweiPush, FireOSPush, WindowsPush, macOSPush, ChromeExtensionPush, ChromePush, FirefoxPush, SafariPush The push token, email address, or phone number associated with the subscription. Ensure the token is valid and correctly formatted for the chosen subscription type. Email format: Should be a valid email address that you confirmed can receive emails. SMS format: Phone number must be in E.164 format. iOSPush APNS token format: 64 characters, hexadecimal characters only (0-9,a-f). AndroidPush FCM token format: Typically 163 characters, alphanumeric characters, may contain hyphens, colons and underscore.
The subscription's properties.
202
The Subscription update request has been accepted successfully. This process is asynchronous and may take a few seconds to complete.