Contact-Company Relationship: Overview of Methods
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
The group of methods crm.contact.company.* manages the relationship between a contact and companies: it adds and removes an individual company, reads and replaces the entire set of the contact's companies. A single contact can be linked to several companies.
Quick navigation: all methods
User documentation: Relationship between deals, contacts, and companies
Benefits of the Relationship Between Contacts and Companies
- The contact card displays information about the companies: name, phone number, e-mail, address, company type, and industry.
- You can call or send an e-mail directly from the contact card without navigating to the company card.
- When generating documents from a template, you can use symbolic codes that will automatically insert data from related companies into the document.
How the Relationship Is Structured in the API
The relationship is a separate record, not a contact field. The methods of the group work with a link object that has four fields.
|
Field |
What It Means |
Example Value |
|
|
Identifier of the linked company. The only required field of the link. You can retrieve the identifiers with the method crm.item.list with |
|
|
|
Sorting index. Defines the order of the companies in the contact card |
|
|
|
Whether the link is the primary one. The company from the primary link is written to the contact field |
|
|
|
Identifier of the role. The field is reserved, you do not need to set it |
|
Bitrix24 maintains the primary link itself. The method crm.contact.company.add marks the added company as the primary one if IS_PRIMARY = Y is passed or if the contact does not have a primary company yet. If the primary link is deleted with the method crm.contact.company.delete, the first of the remaining links becomes the primary one. That is why there is no need to update the contact field COMPANY_ID separately.
How to Choose a Method
Some methods of the group work with an individual link, others with the entire set of companies at once.
|
If You Need To |
Open the Method |
|
Add a single company without affecting the others |
|
|
Remove a single company without affecting the others |
|
|
Retrieve the list of the contact's companies |
|
|
Replace the entire set of companies with the one you pass |
|
|
Unlink all companies from the contact |
|
|
Retrieve the description of the link fields |
The mirror task — managing the contacts of a company — is solved by the group of methods crm.company.contact.*.
Overview of Methods
Scope:
crmWho can execute the method: depending on the method — reading the links requires the "read" access permission for the contact, changing the links requires the "modify" permission for the contact and the "read" permission for the company being added or removed, and the description of the fields is available to any user
|
Method |
Description |
|
Adds a company to the specified contact |
|
|
Removes a company from the specified contact |
|
|
Returns a set of companies associated with the specified contact |
|
|
Establishes a set of companies associated with the specified contact |
|
|
Clears the set of companies associated with the specified contact |
|
|
Returns the description of fields for the contact-company relationship |