SMS subscription
// This requires to have a custom user ID registered
// by calling the `identify` method beforehand.
Batch.Profile.editor()
.setPhoneNumber("+33123456789") // Null to erase. A valid E.164 phone number.
.setSMSMarketingSubscription(BatchSMSSubscriptionState.SUBSCRIBED) // or BatchSMSSubscriptionState.UNSUBSCRIBED
.save();// This requires to have a custom user ID registered
// by calling the `identify` method beforehand.
Batch.Profile.editor().apply {
setPhoneNumber("+33123456789") // // Null to erase. A valid E.164 phone number.
setSMSMarketingSubscription(BatchSMSSubscriptionState.SUBSCRIBED) // or BatchSMSSubscriptionState.UNSUBSCRIBED
save()
}Last updated

