APIs & Integrations

crg
Membro

Create a company through API on Hubspot free

resolver

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 Avaliação positiva
1 Solução aceita
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

Create a company through API on Hubspot free

resolver

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 

Exibir solução no post original

0 Avaliação positiva
2 Respostas 2
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

Create a company through API on Hubspot free

resolver

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 

0 Avaliação positiva
crg
Membro

Create a company through API on Hubspot free

resolver

Thank you very much

0 Avaliação positiva