How to stop mailing completely
For example, in Whatsapp there is no option to deny messages and to prevent the user from pressing the "SPAM" button, you need to stop the mailing at his request.
All other messengers have a system capability
A notification regarding the unsubscription will appear in the conversation with the client, and an indicator—a symbol with an "X"—will be displayed in the "About the client" tab, showing that the client has opted out of receiving messages from the bot (i.e., has unsubscribed).

If a client is marked as unsubscribed, messages will not reach them.

Pomnite!
Ne vse messendzhery prisylayut uvedomleniya o tom, chto kliyent otpisalsya ot soobshcheniy.
How to Unsubscribe Manually
You can set up an option for clients to unsubscribe from messages within your bot.
Let’s look at an example using WhatsApp.
Create a conditional block based on the logic of your sales funnel. The "Primary Condition Check" block has the highest execution priority.

In the "Condition" field, list—separated by semicolons—all the words or phrases users might type to unsubscribe from the bot's messages. In this same block, ask the client to confirm that they truly wish to unsubscribe, and provide two buttons: "Yes" and "No."
When reaching the "Primary Check" block, the client will need to click one of the buttons; we will specify the button labels in the arrow conditions:

In the next block—reached via the path labeled "Yes, remove from database"—add a message confirming that the client has successfully unsubscribed:

Next, create a subsequent block following the one containing the successful-unsubscription message; this block will house the unsubscription function:
unsubscribe()
Please note!
Within a block, actions defined in the "Calculator" are processed first, followed by the sending of any message text.
If you include both the unsubscription message text and the unsubscription function in the same block, the client will NOT receive the message—it will fail to be delivered to the user.

Important!
A client will re-subscribe to messages if they send any message to the bot; until that happens, no messages will be sent to them.
How to partially unsubscribe from mailings
To implement partial unsubscribing, you need to assign variables and check their values before sending messages.
Assign variables within a block using the "Calculator" field.
Alternatively, you can manually create a client variable in the "About the client" tab during a conversation; this variable can then be used to exclude the client from future mailings.
For example, if a user is assigned the variable send_in_the_morning with the value no, you can configure your mailing filter to exclude users based on this variable's value:

Additionally, within a block or a connector leading to a broadcast block, you can specify send_in_the_morning == "no" in the "Variable for comparison" field to ensure the message is delivered to the user in the evening. Conditions can be combined in various ways.
Example of using the "Variable for comparison" field when scheduling messages:

How to set up a response to an unsubscription
Often, it is necessary to trigger specific actions within a bot when a client unsubscribes. For example, you might need to send data to an analytics system, add or remove a client from lists, apply or remove tags, or make a server request.
To handle this, you can configure a conditional block that reacts to a client unsubscription notification. This callback (notification) is triggered within the conversation with the client once they have opted out of receiving messages (for instance, "Stop and block bot" on Telegram).

In the block, enter client_unsubscribed in the "Condition" field and select "Exact match" as the matching criterion.

The actions and requests configured within the block will be executed, but the message will NOT be sent to the client, as the client has already unsubscribed.
This callback works for Viber, and Telegram.