# Automatically collect opt outs

Infobip automatically collects opt outs depending on the client-defined rules. For example, this includes opt out based on keywords, URLs, and evaluating event from Moments.

Contacts and destinations can be collected by Infobip. The first step is to create the rules upon which Infobip will collect these, and when you enable the rules, Infobip then handles the blocklist using the opt out information.

There are different ways that opt outs can be collected and those depend on your use cases, country regulations and also channels and senders you are using to communicate with your end users.

The following sections describe automatic collection of opt outs for:

- Keyword-based rules (MO)
- URL opt out
- Event-based triggers in communication flow

## Keyword-based rules (MO)

When you use a keyword trigger, if the customer replies with the specific keyword (for example, STOP), the end user's contact information is automatically added to the Blocklist. The same contact can resubscribe again with a specific keyword (for example, **START**).

These steps show you how to add a keyword to trigger a rule that automatically adds the user to the Blocklist:

1. Go to **Channels and Numbers**, and the select **Numbers**.
2. Select a sender from sender list for which you want to set up keyword-based rule.
3. In the **Inbound configuration** section, click on a plus sign next to **Keywords**.
4. Define the keyword. In this example, the keyword is **STOP**.
5. Select the **Non-forwarding action** as **Blocking action**. Ensure that the **Type** is set to **Add to blocklist**.
6. Choose the level of blocking on either the account level or the number level:
   - From any sender: customers will not receive messages from your account
7. Click **Add Keyword**.

For more information, see [Messaging actions](https://www.infobip.com/docs/numbers/keywords-and-actions#messaging-actions-actions).

## URL opt out

You can add an opt out link in a message so that when an end user clicks the opt out link, they are added to the Blocklist automatically. This is usually used for cases when the sender is not two-way enabled but you want to give the option to the end user to opt out (Alphanumeric senders, for example).

To get the URL opt out feature, contact `Support@infobip.com`.

## Event-based triggers in communication flow

Contacts and destinations are automatically added using trigger events from a communication flow. When you enable these triggers, Infobip then handles the blocklist using the opt out information.

A trigger event in a Flow can include:

- End user unsubscribes by replying with a specific keyword, for example, **STOP**
- End user clicks an opt out link included in the message
- End user does not open the message in the specified time

To use trigger event in a Flow, you include an element called **Add to Do Not Contact list**.

When you use a keyword trigger, if the customer replies with the specific keyword (for example, **STOP**), the **Add to Do Not Contact list** element is activated and the customer's number or email is automatically added to the Do Not Contact list.

For more information about using event triggers in Flows for automatically adding to the blocklist, see [Moments](https://www.infobip.com/docs/moments/flow-elements/functions#add-or-remove-from-do-not-contact-list-functions).