For a more customized implementation
Set Up The HTML Form
Attach A JavaScript Event Listener
Gather Form Data
Send The POST Request
<form id="myForm" method="POST"> <input type="text" name="organizationName" placeholder="Enter the name of your business"> <input type="email" name="contactEmail" placeholder="Enter your email"> <input type="text" name="domain" placeholder="Enter your website domain"> <button type="submit">Submit</button> </form> <script> const form = document.getElementById("myForm"); form.addEventListener("submit", (event) => { event.preventDefault(); const formData = new FormData(form); // Replace with your actual Agent ID. formData.append("agentId", "your-agent-id-here"); // Read next article to learn about utm source tracking formData.append("utmSource", "custom-form"); const dataObj = {}; formData.forEach(function(value, key){ dataObj[key] = value; }); fetch("https://api-v1.telivy.com/api/v1/applications/public", { method: "POST", body: JSON.stringify(dataObj), headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' } }) .then(data => { console.log(data); }) .catch(error => { console.error(error); }); }); </script>