# Consent management The consent management functionality allows you to manage the registration of opt-in and opt-out mobile originated messages sent by your end-users. ## Consent management lists Any opt-out data recorded by the consent management functionality is stored in list format, and these lists control whether messages can be sent to specific recipients. The consent lists each correspond to a specific type of opt-out, and they are detailed below: 1. `OPT_OUT_ALL`: This is the standard opt-out, and it blocks sending for all message types. 2. `OPT_OUT_MARKETING`: This opt-out type only blocks marketing messages. Marketing messages are defined as messages that have the `message_content_type` field set to `CONTENT_MARKETING`. 3. `OPT_OUT_NOTIFICATION`: This opt-out type only blocks notification messages. Notification messages are defined as messages that have the `message_content_type` field set to `CONTENT_NOTIFICATION`. Note The `message_content_type` field is optional. However, to classify messages accurately, it's considered a best practice to populate the `message_content_type` field. This allows the system to identify whether a message is marketing or notification-related. If no content type is passed on the messages, the consent management functionality will assign the message to the `OPT_OUT_ALL` list. ## Enabling consent management To enable consent management: 1. Navigate to the corresponding Conversation API app's details page. Then, accept the terms and conditions: ![Consent management terms and conditions](/assets/convapi-consent-enable1.0bea33260a0224e8141bbc6bbed5adc864e0fa20e3032de709c48bd90e511e88.05b96cbd.png) 2. Then, enable the functionality: ![Consent management blocking modes](/assets/convapi-consent-enable2.3322546610c1d19b711b2f262e214576ebdab614cdaef0ced2db4c1cd6c68b0b.05b96cbd.png) 3. Finally, select your Consent processing type: ![Consent management enable](/assets/convapi-consent-enable3.b725ee2374462b6882e0a16ae8dbdcab19fdd41d491bb8d47f13dd4276b59764.05b96cbd.png) ### Consent processing types explanation There are two consent processing (or restriction) types available with the consent management functionality: - In Primary mode, any subsequent mobile terminated messages sent to the opted-out recipients will be blocked by Sinch. An autoreply message still will be sent. - In Secondary mode, no blocking by Sinch is performed. The presence of an opt-in or opt-out keyword triggers the functionality when it is the sole element within an inbound, mobile originated message. The notification will then be sent via the [Opt-out](/docs/conversation/callbacks/#opt-out), [Opt-in](/docs/conversation/callbacks/#opt-in) webhook triggers. **Customers are required to take actions in their triggering application to prevent it from sending future messages to recipients that asked for opt-out.** ## How consent management works Once enabled, the consent management functionality will start processing mobile originated messages. Note: For the sake of simplicity, this section explains the functionality operating in **Primary** mode, in which messages are blocked by Sinch after opt-out. For more information on the difference between the **Primary** and **Secondary** modes, see the [Consent processing types explanation](#consent-processing-types-explanation) section. For all mobile originated messages, the consent management functionality will check for the presence of keywords that identify the message is an opt-in or opt-out message, and associate the message with one of the [list categories](#consent-management-lists). Note the following: - The system checks for an exact match. So, for example, if the keyword *stop* is set as the opt-out keyword, a message containing the text `stop` will trigger the consent management functionality. However, message containing the text `stop now please` will **not** trigger the functionality. - The consent management matching process is case insensitive, so text like `Stop`, `STOP`, `stoP`, etc. would all trigger the functionality in this example case. - If no keywords are provided, a default keyword list is provided. For more information about how to customize keywords or auto-replies, see the [Customization](#customization) section. After a message is matched, an opt-out/in autoreply message is sent to the user, as shown in the example below: ![Auto-reply](/assets/autoreply.82ee5d6c2b44029351fc0c6e13865c5a31c86ab59cdf60a9506ac9d68a016610.05b96cbd.png) The auto-reply message(s) is/are also customizable. If no custom auto-reply message is provided, a default auto-reply is sent to the end-user. Once the constent management has recorded the opt-in or opt-out and sent an auto-reply message, an [opt-in callback](/docs/conversation/callbacks/#opt-in) or [opt-out callback](/docs/conversation/callbacks/#opt-out) is delivered to your system via webhook trigger. ## Customization Both auto-replies and trigger keywords have defaults for the English, Spanish, and Portuguese languages. The defaults are as follows: | Language | Opt-out type | Opt-out keywords | Opt-in keywords | Opt-out auto-reply | Opt-in auto-reply | | --- | --- | --- | --- | --- | --- | | English | ALL | "STOP", "UNSUBSCRIBE", "OptOut_All_EN" | "START", "SUBSCRIBE", "OptIn_All_EN" | "Your request to leave has been accomplished." | "Your request to get back has been accomplished." | | English | MARKETING | "STOP MARKETING", "UNSUBSCRIBE MARKETING", "OptOut_Marketing_EN" | "START MARKETING", "SUBSCRIBE MARKETING", "OptIn_Marketing_EN" | "Your request to leave has been accomplished." | "Your request to get back has been accomplished." | | English | NOTIFICATION | "STOP NOTIFICATION", "UNSUBSCRIBE NOTIFICATION", "OptOut_Notification_EN" | "START NOTIFICATION", "SUBSCRIBE NOTIFICATION", "OptIn_Notification_EN" | "Your request to leave has been accomplished." | "Your request to get back has been accomplished." | | Spanish | ALL | "DETENER", "SALIR", "OptOut_All_ES" | "VOLVER", "RECIBIR", "OptIn_All_ES" | "Su solicitud de salida se ha cumplido." | "Su solicitud de regreso ha sido concedida." | | Spanish | MARKETING | "DETENER MARKETING", "SALIR MARKETING", "OptOut_Marketing_ES" | "VOLVER MARKETING", "RECIBIR MARKETING", "OptIn_Marketing_ES" | "Su solicitud de salida se ha cumplido." | "Su solicitud de regreso ha sido concedida." | | Spanish | NOTIFICATION | "DETENER NOTIFICACIÓN", "SALIR NOTIFICACIÓN", "OptOut_Notification_ES" | "VOLVER NOTIFICACIÓN", "RECIBIR NOTIFICACIÓN", "OptIn_Notification_ES" | "Su solicitud de salida se ha cumplido." | "Su solicitud de regreso ha sido concedida." | | Portuguese | ALL | "PARAR", "CANCELAR", "OptOut_All_PT" | "VOLTAR", "RECEBER", "OptIn_All_PT" | "Seu pedido de saída foi atendido." | "Seu pedido de voltar foi atendido." | | Portuguese | MARKETING | "PARAR MARKETING", "CANCELAR MARKETING", "OptOut_Marketing_PT" | "VOLTAR MARKETING", "RECEBER MARKETING", "OptIn_Marketing_PT" | "Seu pedido de saída foi atendido." | "Seu pedido de voltar foi atendido." | | Portuguese | NOTIFICATION | "PARAR NOTIFICAÇÃO", "CANCELAR NOTIFICAÇÃO", "OptOut_Notification_PT" | "VOLTAR NOTIFICAÇÃO", "RECEBER NOTIFICAÇÃO", "OptIn_Notification_PT" | "Seu pedido de saída foi atendido." | "Seu pedido de voltar foi atendido." | After enabling consent management, it is also possible to customize the keywords and auto-replies used for consent. The customization's list can be seen next to consent management settings, after it is enabled. To create a new customization, click on **Create new** button: ![Consent management customization list](/assets/convapi-customization-1.1398299c4adb94174ba71faa90c6b2bcef488396c5f3b1c362eb5b2e9fa4a2e8.05b96cbd.png) Keywords and auto-replies can be set by language, from the dropdown list on ISO format (see below): ![Consent management language list](/assets/convapi-customization-dropdown.ad6a97837d274d9e57be78fc296626e3138895176c5568671e01d2ac689e29fb.05b96cbd.png) After selecting a language, populate the form with the required information: ![Consent management customization edit](/assets/convapi-customization-2.95bedb4f4e879c5cef55f9afd5f899481ae4c349fed2f970c5c407c701217486.05b96cbd.png) ## Fees When using Consent Management, there are no extra charges for any Mobile Originated (MO) messages processed. All auto-response messages are charged as normal Mobile Terminated (MT) messages. ## Public endpoints Consent management has some public API endpoints for querying information regarding the consent lists. For more information, please see the [Conversation API reference page](/docs/conversation/api-reference/).