Can HubSpot Access Our Endpoints?


Hey HubSpot Dev team. Quick question:

We're attempting to integrate a HubSpot form onto our site that, once fields are filled out and submitted, pre-populates the same fields on a corresponding Fountain web page.

Can HubSpot access our endpoints and does it have a framework to handle our responses? HubSpot would be replacing what we’re currently hosting on our Rails app.


Hi @John_Wachunas! Happy to help but I have a few questions. Can you please explain your end goal a little further? You can submit data to HubSpot using an embedded HubSpot form or a custom form in conjunction with the Forms API:

I'm not totally sure of what you mean by

What is the intent behind your question? HubSpot won't make any requests to your external database. Rather, you'd make requests to any of the HubSpot endpoints to push data into HubSpot. If you need to take info from HubSpot and push it to your system, you'd need to use the HubSpot endpoints to pull down the date you wanted, parse it out, then push that data to your own endpoints. Let me know if I'm off base here - looking forward to your response.


Hi Connor,

What we're looking for is a bit more complex than that. Our current form, which is hosted on our own app server, gets a list of data from our backend to populate a dropdown menu. Once the user enters in their information, one of two things happens: 1) the location they entered is a place we operate in and we redirect this user to an external site for further processing, or 2) we don't operate in where they entered and we thank them for their submission without redirecting. Ideally, we'd like to replicate this behavior on HubSpot, and we're wondering if these are possible. It seems like sending a POST to us is a possibility, but would it be possible for the form to GET a json to populate a dropdown?


Hi @Connor_Barley, does Sergey's response help answer your question? Hoping to have a relatively quick resolution to this issue so we can get the page in question created. Your help is much appreciated.


Hi @John_Wachunas and @Sergey_Smirnov, apologies for the delay - I'm not sure how this topic slipped through the cracks. If I'm understanding you correctly your process is as follows:

  1. Visitor submits form
  2. Perform lookup based on location data
  3. If the visitor's location is serviceable, redirect them to site
  4. If the visitor's location is not serviceable, display thank you message

Are you looking to completely replace this process you currently have with native HubSpot Forms on a HubSpot hosted site, or keep your external site but just replace your forms with HubSpot forms?

EDIT: To add some more color here: If you're looking to replace your forms with HubSpot forms, I don't see a way to do this. We have some built in callback functions like onFormReady and onFormSubmit, but none that would fit your needs. onFormSubmit will fire just after clicking the submit button, but just before the data is submitted.You cannot stop the submission, wait for an AJAX call, and then finally submit the data --the code in the onFormSubmit function is run and the data is sent immediately. From your setup, it sounds like you'd need to make a GET to your endpoints just after the contact submits the form but just before the data is sent so that you could handle the redirect logic. Unfortunately, I don't see a way we could do this unless you somehow fire the Ajax call just after the user clicks out of the field where they submit their location (could use the blur event with JQuery), to populate the dropdowns. Even then, a HubSpot form's dropdown values are not able to be overwritten or added to so this wouldn't be a viable solution. I'd suggest using the forms API to submit data to HubSpot after you've handled your redirect logic and continuing to use custom forms.