Migrating to the New CRM Methods
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
This page helps you migrate an integration from the CRM methods of the previous API version to REST 3.0: find the equivalent of each method, take into account what REST 3.0 does not support yet, and update the request and response format.
Methods of both versions work at the same time and change the same data. You can migrate an integration step by step: call some methods at the /rest/api/ address and the rest at the /rest/ address.
Migration Steps
- Find the equivalents of the methods your integration uses by following the rules in the How to Find the Equivalent of a Method section. If REST 3.0 does not support a task, keep that call in the previous version: such tasks are listed in the What REST 3.0 Does Not Support Yet section
- Change the call address from
/rest/to/rest/api/. The method name stays the same for deals, leads, contacts, companies, and estimates. For SPAs and invoices, it changes tocrm.<type>.<action>, for examplecrm.smartprocess1038.add - Rename the fields to
camelCase:TITLE→title,STAGE_ID→stageId. The field names of each type are listed on the fields pages, for example Deal fields - List the fields you need in the
selectparameter. Without it, thegetandlistmethods return onlyid - Update the handling of responses and errors: data comes in the
resultobject, and errors come in theerrorobject with a code and a message. The format is described in the REST 3.0 overview - Test the new calls on test data before switching over the production scenario
Example: Creating a Deal
In the previous version, fields are passed in uppercase, and the method returns the ID as a number.
curl -X POST \
-H "Content-Type: application/json" \
-d '{"FIELDS":{"TITLE":"Purchase request","ASSIGNED_BY_ID":1,"OPPORTUNITY":150000,"CURRENCY_ID":"EUR"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.deal.add
{
"result": 9021
}
In REST 3.0, the same call goes to the /rest/api/ address, fields are passed in camelCase, and the ID comes in the result object.
curl -X POST \
-H "Content-Type: application/json" \
-d '{"fields":{"title":"Purchase request","assignedById":1,"opportunity":150000,"currencyId":"EUR"}}' \
https://**put_your_bitrix24_address**/rest/api/**put_your_user_id_here**/**put_your_webhook_here**/crm.deal.add
{
"result": {
"id": 9023
}
}
How to Find the Equivalent of a Method
Methods of deals, leads, contacts, companies, and estimates. The method name in REST 3.0 is the same, and only the call address changes. For example, crm.deal.add, crm.deal.get, crm.deal.list, crm.deal.update, and crm.deal.delete exist in both versions, as do the add, get, list, update, and delete methods of leads, contacts, companies, and estimates.
Universal methods crm.item.*. In REST 3.0, the object type is part of the method name, so the entityTypeId parameter is not needed. For example, crm.item.add with entityTypeId: 2 becomes the crm.deal.add method, and crm.item.list with entityTypeId: 1038 becomes the crm.smartprocess1038.list method. Product items of an item also get the type in the name: for a deal, crm.item.productrow.add becomes crm.deal.productrow.add. The segments of all types are listed in the CRM overview.
Other methods have different names in REST 3.0. They are listed in the table. The table uses deal methods as examples, and company methods for requisites and addresses. For other object types, the name contains their segment instead of deal or company: crm.lead.field.list, crm.contact.requisite.add.
|
Previous version |
REST 3.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
crm.deal.get: all contacts in the |
|
|
crm.deal.addfieldvalue with the |
|
|
crm.deal.deletefieldvalue with the |
|
|
crm.deal.update with the |
|
|
crm.deal.update with an empty |
|
|
crm.contact.get: all companies in the |
|
|
crm.contact.addfieldvalue with the |
|
|
crm.contact.deletefieldvalue with the |
|
|
crm.contact.update with the |
|
|
crm.contact.update with an empty |
|
|
crm.company.get: all contacts in the |
|
|
crm.company.addfieldvalue with the |
|
|
crm.company.deletefieldvalue with the |
|
|
crm.company.update with the |
|
|
crm.company.update with an empty |
|
|
|
|
|
Directories — crm.dictionary.<directory>.*, stages of deals and SPAs — crm.deal.category.stage.* |
|
|
crm.company.requisite.* and |
|
|
|
|
|
crm.deal.clientrequisite.* for client requisites, |
|
|
Addresses of contacts, companies, and leads — crm.company.address.*, requisite addresses — crm.company.requisite.address.* |
|
|
|
|
|
What REST 3.0 Does Not Support Yet
For these tasks, keep the calls of the previous version at the /rest/ address.
|
Task |
Method of the previous version |
|
Work with CRM documents and B2E documents |
|
|
Work with pipelines of invoices and documents |
|
|
Work with stages of leads, estimates, and invoices, and with the call list status directory |
|
|
Create a custom field of the List or File type |
|
|
Set the order of contacts in a deal, or make a contact's company primary when adding it |
|
|
Work with custom fields of requisites |
|
|
Create and update requisite templates |
|
|
Select my company requisites in an estimate or an SPA |
|
|
Retrieve all activity fields, including settings and provider data, or retrieve a list of activities without administrator permissions |
|
|
Create or update an activity |
|
|
Reset a card view to the default settings |
|
|
Retrieve the short object type codes |
|
|
Find out the CRM mode without administrator permissions |
|
|
Create or configure an SPA type |
|
|
Work with the timeline, document generator, automation, currencies, call lists, duplicates, sales intelligence, digital workplaces, payments, and deliveries |
The methods of these sections in the CRM overview |
How REST 3.0 Differs from the Previous Version
- One scheme for all types. The
crm.<type>.*methods work the same way for deals, leads, contacts, companies, estimates, invoices, and SPAs. Only the set of groups and the fields of the type differ - Field names in
camelCase. The deal stage is thestageIdfield, notSTAGE_ID. Custom fields keep names likeUF_CRM_… - Fields are selected explicitly. Without
select, thecrm.<type>.getandcrm.<type>.listmethods return only the itemid. Inselect, you can request fields of linked objects with dot notation, for exampleassignedBy.lastNameorstage.name. Nested groups have their ownselectrules, which are described on the method pages - New filter and pagination format. The
filter,order, andpaginationparameters follow the general REST 3.0 rules. Thecrm.<type>.listmethod returns 50 items by default, up to 1000. In list methods of nested groups, the filter usually requires a condition on the owner, for exampleownerId, and the page limit may be lower - Field descriptions in every group. Each group of methods has its own
field.getandfield.list, for examplecrm.deal.productrow.field.listreturns the fields of a product item
The parameter and response format is described in the REST 3.0 overview: selecting fields and linked objects, filtering, comparison with the old version.