Blueshift automatically unsubscribes customers when they click on the unsubscribe link in the footer or headers in an email sent from a campaign. However, there may be scenarios where you may want to manually unsubscribe customers.


Blueshift does not send any messages to customers who have unsubscribed from a channel. To send messages to customers who have unsubscribed, use the override options in the campaign properties. For example, if you have a transactional campaign, you might want to send messages to customers who have otherwise unsubscribed.

Unsubscribed attributes

Here are the standard attributes used by Blueshift to indicate the subscription status for a customer. Additionally, you can also add any custom attributes to manage your subscriptions.

Email unsubscribed


(This is set automatically when we receive the unsubscribed event)

Push unsubscribed_push unsubscribed_push_at
In-app unsubscribed_inapp unsubscribed_inapp_at
SMS unsubscribed_sms unsubscribed_sms_at
Standard Attributes opted_in opted_in_at

Send unsubscribe data

You can send unsubscribe data to Blueshift using any of the following methods:

Unsubscribes for SMS


It is important that all your customer phone numbers are saved in the E.164 standard.

In case of phone number based subscription management, when a subscribe or unsubscribe is received from a phone number, Blueshift searches for the customer based on the phone number field. Most SMS vendors use the E.164 format for phone numbers. If you have not used the same format to save phone numbers for your customers, Blueshift might not be able to find and update the right customer. 

For example, if we receive an unsubscribe message from +14152302112 and you have added the phone number as (415) 230-2112, we will not be able to match them and the customer will not be unsubscribed.

Self-Hosted Unsubscribe Pages

In a self-hosted unsubscribe page setup, instead of using {{unsubscribe_link}}, customers are directed to a custom URL where unsubscribe_link is passed as a URL parameter. In this way you can record the unsubscribe action in Blueshift and ensure that campaign attribution is preserved.

For example:

<a bsft-no-track href="{{user.customer_id}}&bsft_unsub={{unsubscribe_link | url_encode}}">Unsubscribe<a>

Note: "bsft-no-track" must be present in order for this to work.

Example of a formatted URL:

Backend handling is required for this request to decode the bsft_unsub parameter and make a request to that URL. This will simulate a customer clicking the link directly in their email, and preserves the attribution of the unsubscribe action to the particular experiment, trigger, and campaign involved with the message.

Example client-side get call:

function getQueryVariable(variable) {
const query =;
const vars = query.split('&');
for (let i = 0; i < vars.length; i++) {
const pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
const unsubscribeLink = getQueryVariable('bsft_unsub')
fetch(unsubscribeLink, { mode: 'no-cors'})
.then((response) => console.log(response))


Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.