Receiving failed to load when call form API


I'm calling the forms API with straight JavaScript. I receive the error Failed to load with the URL supplied. The URL is correct as it tries to redirect to the redirect page in the form. How can I find out why the form failed to load. Is PHP, C#, VB and NodeJS the only methods that you can use to call the forms API?

This is the only parameter I'm passing at this time {"email":""}


Hi @aemmi,

The Forms API is platform-agnostic, but it doesn't support CORS AJAX, so if you're trying to submit forms client-side then you'd see a CORS error. If not, can you send me the raw error you're seeing, and also the full request you're making to the forms API?


Derek ,

Thank you for your response. I was attempting to make the call from the client side using JavaScript within a JSP page. I have switched to making the call from a PHP page on the server side and I have been successfully in making the call.

One other question after successfully making the call to the HUBSPOT form, does the HUBSPOT form redirects the page that is supplied in the form or does it just pass back the redirected link

Thank You



Hi @aemmi,

When the form submissions is successful and a redirectUrl is included or set in the form settings , the response upon submission should be a 302. You can then pass this along to the client to redirect them to the correct URL.


Thank you for your prompt response. I am receiving a 302 status code. I will now be able to make the necessary changes




I'm getting a 302 error when using the php form submission. Can you tell me how to fix it. How would I pass this to the client as you mention above?


Hi @bds9487,

Check out the following stack overflow topic: