How to integrate third Party API on Hubspot Website form submission

How I can integrate a thirdparty API on form submission on Hubspot website?

Do I need to subscribe any plan?

I did not find any docs. Where can I find the docs on thirdparty API integration on Website.

Hi @RKallepalli,

You can use the “onFormSubmit” event and make a call to a serverless function when the form is submitted. In order to use serverless functions in HubSpot, you would need an Content Hub Enterprise plan.

<script>
window.addEventListener('message', function(event) {
 if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') {

 // your code here

 }
});
</script>