v1

latestOpenAPI 3.1.02026-07-26497885.9 KB

Update subscription By Token

Update properties on an existing Subscription using its token. Commonly used to enable or disable subscription status when managing outside of the OneSignal SDK.

patch/apps/{app_id}/subscriptions_by_token/{token_type}/{token}

Path parameters

app_idstring required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

token_type'Email' | 'SMS' | 'iOSPush' | 'AndroidPush' | 'HuaweiPush' | 'FireOSPush' | 'WindowsPush' | 'macOSPush' | 'ChromeExtensionPush' | 'ChromePush' | 'FirefoxPush' | 'SafariPush' required

The subscription channel type. Must match the format of the token.

tokenstring required

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.

Headers

Authorizationstring required

Your App API key with prefix Key . See Keys & IDs.

Request body

Response

202

object required

The Subscription update request has been accepted successfully. This process is asynchronous and may take a few seconds to complete.