{% note tip "" %}
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
{% endnote %}
In Bitrix24, you can create user agreements. They are necessary if you process personal data, send newsletters, or perform other actions that require user consent.
With the REST API, you can:
- retrieve lists of agreements
- upload agreement texts
- save obtained consents
Agreements should be created and modified through the Bitrix24 interface.
Quick navigation: all methods
There are two types of agreements in Bitrix24: standard and custom.
-
Standard agreements are created from pre-installed templates. They support localization and variable replacement through the
replaceparameter in the userconsent.agreement.text method. -
Custom agreements are created manually. They contain arbitrary HTML text and do not support variable substitution.
{% note info "" %}
To collect consents for processing personal data, use the standard agreement. Add your company details and an email for feedback. For other scenarios, create custom agreements.
{% endnote %}
- Retrieve the list of agreements using the userconsent.agreement.list method and find the agreement you need by its name
NAME. Check the activity flagACTIVE: for a disabled agreement, it equalsN. - Retrieve the text of the agreement using the userconsent.agreement.text method. Provide the agreement identifier
id. For a standard agreement, provide your company details and the confirmation button text in thereplaceparameter. - Show the user the text
TEXTand the button labelLABELfrom the response. Through the REST API, Bitrix24 returns only the text of the agreement — you display the consent form on your side. - Save the obtained consent using the userconsent.consent.add method. Provide the agreement identifier
AGREEMENT_IDand the user's IP addressIP. The method returns the identifier of the saved consent.
Users. Consents can be linked to users through the USER_ID parameter. To obtain the user ID, use the user.get and user.search methods.
{% note tip "User Documentation" %}
- Collect customer consent via a CRM form
- Obtain consent for personal data processing in Open Channels
- Consent to receive newsletters
- Personal data processing
{% endnote %}
Scope:
userconsentWho can execute the method: any user
#| || Method | Description || || userconsent.agreement.list | Retrieves a list of agreements || || userconsent.agreement.text | Retrieves the text of an agreement || || userconsent.consent.add | Saves the obtained user consent || |#