Send form submission data to HubSpot. Form submissions from external sources can be made to any registered HubSpot form. You can see a list of forms on your account by going to the Contacts > Forms page.
We suggest that you create a unique form within HubSpot to parallel your custom website form. This will make it easy to track submissions on that particular custom form in the future. More information can be found here.
The Form GUID can be found in one of two ways. First, you can pull a list of Contact Forms using the Forms API, as documented here
You can also find the Form GUID in the HubSpot UI: navigate to Contacts > Forms from the navigation menu > click to edit a specific form > when editing a specific form, you can find the Form GUID in the URL. In the URL https://app.hubspot.com/forms/62515/78c2891f-ebdd-44c0-bd94-15c012bbbfbf/edit/, the form GUID is 78c2891f-ebdd-44c0-bd94-15c012bbbfbf
- The fields in the form will correspond to contact properties set up for the HubSpot account. Please see the Contacts API and Contact Properties API for more details.
- When updating a property to have multiple values, separate each value with a semicolon eg.
- While email is listed as optional, contacts will only be created when an email address is included in the submission
- When writing to a form that has CAPTCHA enabled, this endpoint will fail unless a reCAPTCHA token is included in the body of the request.
- While hs_context is listed as optional, it includes meta-data for the form submission that HubSpot uses to provide additional data about contacts:
- The hutk parameter is used to associate analytics data with your contacts. Without this, page views and the original source will not be populated.
- The ipAddress is used to populate the ipaddress property of the contact, which is used to populate the IP City, Country, State/Region properties of the contacts. Note: if no ipAddress is included, the IP address will be set to the IP of the system making the request to the Forms API, which could be your server. Additionally, HubSpot will ignore an IP address from a reserved block (e.g. 127.0.0.0/8).
- The Forms API does not perform any validation on the fields included in the submission data. Any validation needs to be performed before the data is sent in the POST request.
- The validation options set in HubSpot in the form settings will only affect embedded forms.
- This endpoint does not support CORS AJAX requests. See this article for more details.