Connect your website form
to the Leads module
Add a small snippet of code to your website and every form submission automatically becomes a lead in your BizBotify dashboard — ready for follow-up on WhatsApp.
Generate a Form Token
A Form Token is a secret key that proves a submission came from your website. You create one per form (or one per website).
Contact page form or Homepage demo request. This is just for your reference.ft_live_aBcDeFgH1234567890abcdefgh12. Save it somewhere safe (a password manager or .env file). BizBotify stores only a hash, so if you lose it you will need to regenerate a new one.Restrict submissions to your domain
Tell BizBotify which website is allowed to use this token. This prevents anyone else from submitting leads using your token.
https://www.myboutique.comhttps://myboutique.comIf your site is on both
www and non-www, add both as separate entries.
localhost. Add your production domain before going live.
Add the snippet to your HTML page
Copy the code below into your webpage. It intercepts your form's submit event, collects the field values, and sends them to BizBotify.
First, add the honeypot field inside your <form> tag. This hidden field fools spam bots into filling it in, and BizBotify silently discards those submissions.
<!-- BizBotify honeypot — do not remove -->
<input type="text" name="_hp"
style="position:absolute;left:-9999px;opacity:0;height:0"
tabindex="-1" autocomplete="off">
Then add the submission script just before your closing </body> tag. Replace YOUR_FORM_ID with the id attribute of your <form> element, and ft_live_YOUR_TOKEN with the token you copied in Step 1.
<!-- BizBotify Lead Capture -->
<script>
(function() {
var FORM_ID = 'YOUR_FORM_ID';
var TOKEN = 'ft_live_YOUR_TOKEN';
var ENDPOINT = 'https://app.bizbotify.com/api/public/forms/submit';
// Standard fields sent at the top level of the payload.
// Everything else goes into custom_fields automatically.
var STANDARD = ['name', 'email', 'phone', '_hp'];
document.getElementById(FORM_ID).addEventListener('submit', function(e) {
e.preventDefault();
var submitBtn = e.target.querySelector('[type="submit"]');
if (submitBtn) submitBtn.disabled = true;
var data = Object.fromEntries(new FormData(e.target));
var payload = { _hp: data._hp || '', custom_fields: {} };
STANDARD.forEach(function(k) {
if (data[k] !== undefined) payload[k] = data[k];
});
Object.keys(data).forEach(function(k) {
if (!STANDARD.includes(k)) payload.custom_fields[k] = data[k];
});
fetch(ENDPOINT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Form-Token': TOKEN,
},
body: JSON.stringify(payload),
}).finally(function() {
// Show your own success message here.
// The submit always returns 200 {"ok": true}.
if (submitBtn) submitBtn.disabled = false;
});
});
})();
</script>
Map your form fields
BizBotify recognises three standard fields by name. Everything else is stored as custom data on the lead.
Field name |
Type | Description |
|---|---|---|
| name | Standard optional | Full name of the person submitting the form. Used to populate the Contact's name in BizBotify. |
| Standard optional* | Contact's email address. Used to find an existing contact by email. Either email or phone is required. |
|
| phone | Standard optional* | Contact's phone number, preferably in international format (e.g. +91 98765 43210). Used to find an existing contact by phone. |
| _hp | Honeypot auto | Hidden anti-spam field. Added by the snippet automatically. Do not display this to users. |
| anything else | Custom auto | Any other field (e.g. business, message, team_size) is collected into custom_fields on the lead. You can view these in the lead detail panel. |
* At least one of email or phone must be present for BizBotify to create a contact.
fname and lname inputs, concatenate them before submitting. Example:
payload.name = [data.fname, data.lname].filter(Boolean).join(' ');
Example: a typical contact form
<form id="contact-form">
<!-- BizBotify honeypot — do not remove -->
<input type="text" name="_hp"
style="position:absolute;left:-9999px;opacity:0;height:0"
tabindex="-1" autocomplete="off">
<!-- Standard fields (recognised by BizBotify) -->
<input type="text" name="name" placeholder="Your name" required>
<input type="email" name="email" placeholder="you@example.com">
<input type="tel" name="phone" placeholder="+91 98765 43210" required>
<!-- Custom fields (stored as extra data on the lead) -->
<input type="text" name="business" placeholder="Business name">
<textarea name="message" placeholder="How can we help?"></textarea>
<button type="submit">Send</button>
</form>
Test your integration
Submit your form once with real (or test) details and verify the lead appears in BizBotify.
localhost origin). An invalid token logs a warning server-side but returns {"ok": true} to the browser — check the token value in the script matches what you copied.200 {"ok": true}.
This is intentional — it prevents bots from probing whether a token is valid. If your lead doesn't appear, the issue is client-side (wrong token, CORS, or a JavaScript error). Check the browser console first.
Go live checklist
Before you publish your updated website, run through this checklist.
ft_live_YOUR_TOKEN replaced with your real token.
https://www.myboutique.com) is added to the token's Allowed Origins in the BizBotify dashboard.
<input name="_hp"> is present inside the <form>.
FORM_ID in the script matches the id attribute of your <form> element.
email or phone — otherwise BizBotify cannot create a contact.