<!-- Direct HTML Form submission to Webhook -->
<form action="http://localhost:5050/api/inquiry" method="POST">
<input type="text" name="name" placeholder="Full Name" required />
<input type="tel" name="mobile" placeholder="WhatsApp Number" required />
<input type="email" name="email" placeholder="Email Address" required />
<textarea name="message" placeholder="Your Inquiry"></textarea>
<button type="submit">Submit Inquiry</button>
</form>
// Submit lead from website frontend via Fetch API
async function submitInquiry(lead) {
const response = await fetch('http://localhost:5050/api/inquiry', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: lead.name,
mobile: lead.mobile,
email: lead.email,
message: lead.message
})
});
const data = await response.json();
console.log('HubSpot Deal ID:', data.hubspot.deal_id);
}
curl -X POST http://localhost:5050/api/inquiry \
-H "Content-Type: application/json" \
-d '{
"name": "Amit Patel",
"mobile": "9974027686",
"email": "amit@example.com",
"message": "Please share Vaidya Manager pricing and demo details"
}'