Create a company through API on Hubspot free

SOLVE
crg
Member

Hello,

We are testing Hubspot free and I need to add a company (before adding I created some custom properties in UI directly not through API). If I add the company with only 2 properties, name and description for example, it's ok, but if I added with more properties (default and custom) i get the following error:

curl Errors: Status code: 400 Response: {"validationResults":[{"isValid":false,"message":"Property \"annual revenue\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"annual revenue"},{"isValid":false,"message":"Property \"phone number\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"phone number"},{"isValid":false,"message":"Property \"street address\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"street address"},{"isValid":false,"message":"Property \"country/region\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"country/region"}],"status":"error","message":"Property values were not valid"

 

Is not possible in Hubspot free to add a company with many properties?

 

Kind regards,

Catalin Ghindoveanu

0 Upvotes
1 Accepted solution

Accepted Solutions
WendyGoh
Solution
HubSpot Employee

Hey @crg,

 

When looking to create a company using this endpoint - Create a company | Companies API, one thing to note is that the name value is referring to the internal value of the property (You can refer to this documentation on how to get the internal value of the property - Manage your properties). 

 

Based on the error message that you shared, it looks like you're using the property label as the name value. Could you use the internal value of the company properties and see if it works? If it doesn't, can you share with me the following so that I can further troubleshoot on this:

1. The exact request URL

2. The POST body

3. The portal ID 

View solution in original post

0 Upvotes
2 Replies 2
WendyGoh
Solution
HubSpot Employee

Hey @crg,

 

When looking to create a company using this endpoint - Create a company | Companies API, one thing to note is that the name value is referring to the internal value of the property (You can refer to this documentation on how to get the internal value of the property - Manage your properties). 

 

Based on the error message that you shared, it looks like you're using the property label as the name value. Could you use the internal value of the company properties and see if it works? If it doesn't, can you share with me the following so that I can further troubleshoot on this:

1. The exact request URL

2. The POST body

3. The portal ID 

View solution in original post

0 Upvotes
crg
Member

Thank you very much

0 Upvotes