Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Method Objective

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

Syntax and parameters

sdk.manageSubscription(params)

Request parameters

NameTypeRequirementDescription
emailstringoptionallyThe current user's Email.
phonestringoptionally

The current user's Phone.

emailBulkbooleanoptionallyIt changes the current user's subscription status to bulk email campaigns.
emailChainbooleanoptionallyIt changes the current user's subscription status to triggered email campaigns.
emailTransactionalbooleanoptionallyIt changes the current user's subscription status for transactional email campaigns.
smsBulkbooleanoptionallyIt changes the current user's subscription status to bulk SMS campaigns.
smsChainbooleanoptionallyIt changes the current user's subscription status to triggered SMS campaigns.
smsTransactionalbooleanoptionallyIt changes the current user's subscription status for transactional SMS campaigns.
webPushBulkbooleanoptionallyIt changes the current user's subscription status to bulk webpush campaigns.
webPushChainbooleanoptionallyIt changes the current user's subscription status to triggered webpush campaigns.
webPushTransactionalbooleanoptionallyIt changes the current user's subscription status for transactional webpush campaigns.
mobilePushBulkbooleanoptionallyIt changes the current user's subscription status to bulk app campaigns.
mobilePushChainbooleanoptionallyIt changes the current user's subscription status to triggered app campaigns.
mobilePushTransactionalbooleanoptionallyIt changes the current user's subscription status for transactional app campaigns.

Examples of use

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
)
sdk.manageSubscription(
    email: "john.doe@examplestore.com",
    emailBulk: true,
    emailChain: false,
    emailTransactional: true,
)
sdk.manageSubscription(
    phone: "+100000000000",
    smsBulk: false,
    smsChain: false,
    smsTransactional: true,
)
sdk.manageSubscription(
    emailTransactional: true,
    smsTransactional: true
)
  • No labels