CMS Development

DTeam07
Member

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

We are encountering an issue regarding the functionality of a custom HTML form created in PHP. Our requirement is to submit the form data and insert it into a specific form in HubSpot.


Based on our research, we are using the following API endpoint to achieve this:


API

This API allows us to insert data into a specific form, which meets our initial requirement. However, we are now looking for a functionality that would allow us to update the inserted data by matching the email ID.


In essence, after a data entry has been inserted, we want to be able to update this data using the matching email ID as the reference point.


We have been unable to find a solution to this requirement. Could you please assist us in resolving this issue? We kindly request your prompt response to this matter.


Thank you for your assistance.

0 Upvotes
1 Accepted solution
evaldas
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

Hi @DTeam07,

 

Typically, if there is an existing email in HubSpot CRM, the contact record would automatically get updated by the form submission - it would not create a separate contact with the same email address, as it is the unique ID, so the form submission through API should have you covered.

 

However, if you are looking to do something in addition to that, you might want to take a look at HubSpot's Contacts API, in particular the upsert endpoint. This endpoint allows updating existing contacts and creates new ones if the unique identifier has no match. There are PHP examples in the documentation as well.

 

Hope this helps!


✔️ Did this post help answer your query? Help the community by marking it as a solution.

View solution in original post

0 Upvotes
4 Replies 4
SteveHTM
Key Advisor | Partner
Key Advisor | Partner

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

@DTeam07 - I'd initially recommend the use of the secure API submit call:

https://api.hsforms.com/submissions/v3/integration/secure/submit/:portalId/:formGuid

 

Otherwise, as proposed by @evaldas, I'd use the Upsert call for all the other functionality.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
evaldas
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

Hi @DTeam07,

 

Typically, if there is an existing email in HubSpot CRM, the contact record would automatically get updated by the form submission - it would not create a separate contact with the same email address, as it is the unique ID, so the form submission through API should have you covered.

 

However, if you are looking to do something in addition to that, you might want to take a look at HubSpot's Contacts API, in particular the upsert endpoint. This endpoint allows updating existing contacts and creates new ones if the unique identifier has no match. There are PHP examples in the documentation as well.

 

Hope this helps!


✔️ Did this post help answer your query? Help the community by marking it as a solution.

0 Upvotes
DTeam07
Member

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

Thank you for your response.


Please confirm if we should use the following API for inserting and updating data: https://api.hsforms.com/submissions/v3/integration/secure/submit/:portalId/:formGuid.

0 Upvotes
evaldas
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Request for Assistance to Update Form Data in HubSpot Using Email ID Match

SOLVE

Yes, you can use that API endpoint to create form submissions. It will create new contact records if there is no match for the email entered and it will update records if email already exists. 


✔️ Did this post help answer your query? Help the community by marking it as a solution.

0 Upvotes