Update properties on an existing OneSignal subscription using its subscription_id. Commonly used to enable or disable a subscription when managing outside of the OneSignal SDK.
Use this API to update an existing subscription’s properties.
This endpoint is primarily used by the OneSignal SDK to manage subscription state. Most external use cases are better served by the Update User API, which allows for updating user-level data, including associated subscriptions.
However, this API can be useful if:
enabled: false
) a Subscription (e.g., due to a manual opt-out).subscription_id
and want to update metadata or status flags directly.For email opt-outs, it’s recommended to use the Unsubscribe Email (with token) API instead. This avoids the need to store or manage the subscription_id
.
Required: subscription_id
To update a subscription, you must know the subscription_id
. This is a UUID generated by OneSignal and is immutable.
type
of a subscription. If the type
is incorrect:
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The unique Subscription ID in UUID v4 format generated by OneSignal. See Subscriptions.
200
The Subscription updated successfully. This process is asynchronous and may take a few seconds to complete.
Update properties on an existing OneSignal subscription using its subscription_id. Commonly used to enable or disable a subscription when managing outside of the OneSignal SDK.
Use this API to update an existing subscription’s properties.
This endpoint is primarily used by the OneSignal SDK to manage subscription state. Most external use cases are better served by the Update User API, which allows for updating user-level data, including associated subscriptions.
However, this API can be useful if:
enabled: false
) a Subscription (e.g., due to a manual opt-out).subscription_id
and want to update metadata or status flags directly.For email opt-outs, it’s recommended to use the Unsubscribe Email (with token) API instead. This avoids the need to store or manage the subscription_id
.
Required: subscription_id
To update a subscription, you must know the subscription_id
. This is a UUID generated by OneSignal and is immutable.
type
of a subscription. If the type
is incorrect:
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The unique Subscription ID in UUID v4 format generated by OneSignal. See Subscriptions.
200
The Subscription updated successfully. This process is asynchronous and may take a few seconds to complete.