For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
      • GETGet all Companies
      • POSTCreate a company
      • GETGet a company
      • DELDelete a company
      • PATCHUpdate a company
      • POSTCreate a company/deal attribute
      • GETGet company attributes
      • PATCHLink and Unlink company with contact and deal
      • POSTImport companies(creation and updation)
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Sales CRMCompanies

Link and Unlink company with contact and deal

PATCH
https://api.brevo.com/v3/companies/link-unlink/:id
PATCH
/v3/companies/link-unlink/:id
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.companies.linkAndUnlinkCompanyWithContactAndDeal("id", {});
8}
9main();

Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body.

Was this page helpful?
Previous

Import companies(creation and updation)

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

idstringRequired

Request

Linked / Unlinked contacts and deals ids.

linkContactIdslist of longsOptional
Contact ids for contacts to be linked with company
linkDealsIdslist of stringsOptional
Deal ids for deals to be linked with company
unlinkContactIdslist of longsOptional
Contact ids for contacts to be unlinked from company
unlinkDealsIdslist of stringsOptional
Deal ids for deals to be unlinked from company

Response

Successfully linked/unlinked contacts and deals with the company.

Errors

400
Bad Request Error