APIs & Integrations

Not applicable

Create contact with additional company information

Is it possible to create a contact via the API and include information about the company - specifically the assets_under_management property?
The following code does not work but gives an idea of what I am trying to do. In one pass I want to create a new contact with a company name and associated assets under management.

      properties: [{
        value: fname,
        property: "firstname"
      }, value: cname,
        property: "company"  //this works
      },{
        value: csize,
        property: "associated-company.assets_under_management"  //this does not work
      }]
}
```
I forsee potential problems here if multiple people try to update the same company assets under management, however thought I'd ask. 
thx
0 Upvotes
1 Reply 1
Dadams
HubSpot Employee
HubSpot Employee

Create contact with additional company information

Hi @dan5000

Updates to the company properties cannot be made through the Contacts API, you’d need to update the company separately using the Companies API.

Update a Company | Companies API

PUT /companies/v2/companies/:companyId - Updates the existing company with the id :companyId

Also, the company name property is a text field that’s not directly related to any company record that the contact might be associated with.

What is the difference between the Company Name contact property and the Name...

This article explains the difference between the contact property, Company Name and the company property, Name.

0 Upvotes