Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method Objective

The method allows changing the status of the current user's subscriptions to notification channels.

Syntax and parameters

Code Block
languagejs
themeFadeToGrey
sdk.manageSubscription(params)

Request parameters

NameTypeRequirementDescription
emailstringoptionallyThe current user's Email.
phonestringoptionally

The current user's

Phone

phone in full international format.

Tip

A phone number in full international format may begin with a plus sign (+) followed by the country code, city (area) code, and phone number.


emailBulkbooleanoptionallyIt changes the current user's subscription status to bulk email campaigns.
emailChainbooleanoptionallyIt changes the current user's subscription status to triggered email campaigns.
emailTransactionalbooleanoptionally

It changes the current user's subscription status for transactional email campaigns.

Note

It's recommended that always use the "true" value, even if you don't use transactional messages.


smsBulkbooleanoptionallyIt changes the current user's subscription status to bulk SMS campaigns.
smsChainbooleanoptionallyIt changes the current user's subscription status to triggered SMS campaigns.
smsTransactionalbooleanoptionally

It changes the current user's subscription status for transactional SMS campaigns.

Note

It's recommended that always use the "true" value, even if you don't use transactional messages.


webPushBulkbooleanoptionallyIt changes the current user's subscription status to bulk webpush campaigns.
webPushChainbooleanoptionallyIt changes the current user's subscription status to triggered webpush campaigns.
webPushTransactionalbooleanoptionally

It changes the current user's subscription status for transactional webpush campaigns.

Note

It's recommended that always use the "true" value, even if you don't use transactional messages.


mobilePushBulkbooleanoptionallyIt changes the current user's subscription status to bulk app campaigns.
mobilePushChainbooleanoptionallyIt changes the current user's subscription status to triggered app campaigns.
mobilePushTransactionalbooleanoptionally

It changes the current user's subscription status for transactional app campaigns.

Note

It's recommended that always use the "true" value, even if you don't use transactional messages.


Examples of use

Code Block
languagejs
themeFadeToGrey
sdk.manageSubscription(
    email: "john.doe@examplestore.com",
    phone: "+100000000000",
    emailBulk: true,
    emailChain: true,
    emailTransactional: true,
    smsBulk: true,
    smsChain: true,
    smsTransactional: true,
    webPushBulk: true,
    webPushChain: true,
    webPushTransactional: true,
    mobilePushBulk: true,
    mobilePushChain: true,
    mobilePushTransactional: true
)


Code Block
languagejs
themeFadeToGrey
sdk.manageSubscription(
    email: "john.doe@examplestore.com",
    emailBulk: true,
    emailChain: false,
    emailTransactional: true,
)


Code Block
languagejs
themeFadeToGrey
sdk.manageSubscription(
    phone: "+100000000000",
    smsBulk: false,
    smsChain: false,
    smsTransactional: true,
)


Code Block
languagejs
themeFadeToGrey
sdk.manageSubscription(
    emailTransactional: true,
    smsTransactional: true
)



Column

Page Navigation

Table of Contents
maxLevel3
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "subscriptions"