APIs & Integrations

SM2
Mitglied

Regarding Storing Custom Properties Data in the Contacts

Hey Everyone, Hope you guys are doing well. I am new to Hubspot and I was looking for a quick solution related to Hubspot APIs. I have an existing web application which collects information about users like Name, Email, Company, Number of Years of Experience, Previous Employer Name etc.. and I want to store that information in the Hubspot CRM as Contacts List. Going through the developer docs, I was able to identify 'Create Contact' API related to CRM and was able to integrate the API successfully. The problem here is that this API has fixed parameters like company,email,firstname,lastname,phone,website only and I want to send custom data like Number of Years of Experience, Previous Employer Name etc.. as I mentioned above. I figured out a way to create custom parameters using create_custom_property API but whenever I tried to create a new contact using these new properties, data is not being sent to the CRM. I can see data of default properties but cannot find data related to custom properties that I created. Kindly help me with this issue.Thanks

0 Upvotes
2 Antworten
webdew
Ratgeber/-in | Diamond Partner
Ratgeber/-in | Diamond Partner

Regarding Storing Custom Properties Data in the Contacts

Hi @SM2 ,

Please try below api code for custom properties:

Example POST URL:
https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/<conatctEmail>/?hapikey=demo

Example POST body:
{
"properties": [
{
"property": "<customProperties>",
"value": "<customPropertiesValue>"
}
}

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Regarding Storing Custom Properties Data in the Contacts

@SM2 , you will need to use the internal name of the property in your post request for the contacts api

For example:

{
  "properties": {
    "custom_property": "I am a custom property!"
  }
}

 

If you are doing this, could you please add an example of what you are code looks like (minus hapikey)

0 Upvotes