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

Update a company

PATCH
https://api.brevo.com/v3/companies/:id
PATCH
/v3/companies/: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.updateACompany("id", {});
8}
9main();
1{
2 "attributes": {
3 "created_at": "2022-01-13T19:04:24.376+05:30",
4 "domain": "xyz",
5 "last_updated_at": "2022-04-01T18:47:48.283+05:30",
6 "name": "text",
7 "number_of_contacts": 0,
8 "owner": "62260474111b1101704a9d85",
9 "owner_assign_date": "2022-04-01T18:21:13.379+05:30",
10 "phone_number": 8171844192,
11 "revenue": 10
12 },
13 "id": "629475917295261d9b1f4403",
14 "linkedContactsIds": [
15 1,
16 2,
17 3
18 ],
19 "linkedDealsIds": [
20 "61a5ce58c5d4795761045990",
21 "61a5ce58c5d4795761045991",
22 "61a5ce58c5d4795761045992"
23 ]
24}

Update an existing company”s attributes, name, linked contacts, or linked deals. Note that passing linkedContactsIds or linkedDealsIds replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string.

Was this page helpful?
Previous

Create a company/deal attribute

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

Updated company details.
attributesobjectOptional
Attributes for company update
countryCodelongOptional

Country code if phone_number is passed in attributes.

linkedContactsIdslist of longsOptional

Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed.

linkedDealsIdslist of stringsOptional

Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed.

namestringOptional
Name of company

Response

Company updated successfully
attributesobject
Company attributes with values
idstring
Unique company id
linkedContactsIdslist of integers
Contact ids for contacts linked to this company
linkedDealsIdslist of strings
Deal ids for deals linked to this company

Errors

400
Bad Request Error
404
Not Found Error