WhatsApp subscriptions in Blueshift are managed at the sender level — each WhatsApp sender number tracks opt-ins and opt-outs independently. You can subscribe or unsubscribe customers using identify events, data imports, or the API. Customers can also opt out at any time by replying with a keyword.
Before managing subscriptions, make sure you have a connected WhatsApp adapter. See Set up the WhatsApp Native Integration.
Identify events
Send an identify event to subscribe or unsubscribe a customer in real time. Set whatsapp_subscribed to true to subscribe or false to unsubscribe. Include whatsapp_sender_number to specify which WhatsApp sender the preference applies to.
Subscribe
The following is a sample payload to subscribe a customer:
{
"event": "identify",
"email": "[email protected]",
"whatsapp_subscribed": true,
"whatsapp_sender_number": "+12025550143"
}
Unsubscribe
The following is a sample payload to unsubscribe a customer:
{
"event": "identify",
"email": "[email protected]",
"whatsapp_subscribed": false,
"whatsapp_sender_number": "+12025550143"
}
Multiple senders
To update a customer's subscription for multiple WhatsApp senders in a single event, use the nested whatsapp_preferences format:
{
"event": "identify",
"email": "[email protected]",
"whatsapp_preferences": [
{
"subscribed": true,
"sender_number": "+12025550143"
},
{
"subscribed": false,
"sender_number": "+12025550199"
}
]
}
For details on sending identify events, see Send events from your site or app.
Data imports
Before you import
whatsapp_subscribed and whatsapp_sender_number only show up as mappable fields after Blueshift has seen them once — for example, through a test identify event. Send one first, then run your import.
Update subscriptions in bulk using a CSV or data import. Map your file to the following attributes:
Attribute | Type | Description |
| Boolean |
|
| String | The WhatsApp sender number in E.164 format (for example, |
API
Update subscriptions programmatically using the following APIs. Use the same whatsapp_subscribed and whatsapp_sender_number attributes as shown in the identify event examples above.
Send an event (using
identifyevent)Send bulk events (using
identifyevent)
Keyword-based opt-in and opt-out
When a customer replies to a WhatsApp message with one of the following keywords, Blueshift automatically updates their subscription status for that sender. Matching is case-insensitive and applies to the full message body.
Action | Keywords |
Opt out |
|
Opt in |
|
Templates can also include a quick reply button configured as an opt-out trigger. When a customer taps the button, Blueshift unsubscribes them from that sender.
View subscription status
After a subscription is updated, the customer's WhatsApp preference is visible on their customer profile.
MORE IN THIS SECTION
← Previous: WhatsApp overview
→ Next: WhatsApp templates
