Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 3.57 KB

File metadata and controls

69 lines (43 loc) · 3.57 KB

User Agreements: Overview of Methods

{% 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

Types of Agreements

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 replace parameter 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 %}

How to Obtain Consent

  1. Retrieve the list of agreements using the userconsent.agreement.list method and find the agreement you need by its name NAME. Check the activity flag ACTIVE: for a disabled agreement, it equals N.
  2. 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 the replace parameter.
  3. Show the user the text TEXT and the button label LABEL from the response. Through the REST API, Bitrix24 returns only the text of the agreement — you display the consent form on your side.
  4. Save the obtained consent using the userconsent.consent.add method. Provide the agreement identifier AGREEMENT_ID and the user's IP address IP. The method returns the identifier of the saved consent.

Relationships with Other Objects

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" %}

{% endnote %}

Overview of Methods {#all-methods}

Scope: userconsent

Who 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 || |#