Integration Guide

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.

No backend changes needed Works with any HTML form Built-in spam protection ~10 minutes to set up
Generate a Form Token
Create a secure token in your BizBotify dashboard. It's tied to your organisation and authorises submissions from your website only.
Add the snippet to your form
Copy the JavaScript snippet into your HTML page. It intercepts the form's submit event and sends the data to BizBotify securely.
Leads appear automatically
Every submission creates or updates a contact and adds a lead in your dashboard. Follow up instantly on WhatsApp from the Leads module.

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).

Open the Leads module in your BizBotify dashboard
Navigate to Leads → Form Tokens in the left sidebar.
Click "New Form Token"
Give it a descriptive name like Contact page form or Homepage demo request. This is just for your reference.
Copy your token immediately — it is shown only once
The token looks like 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.
Copy it now — you cannot retrieve it again. The token is shown in full only at the moment of creation. After you close the dialog, BizBotify only stores a cryptographic hash. If you lose the token, use the Regenerate button to issue 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.

Open the token you just created and click "Edit"
Find your new token in the Form Tokens list and open its settings.
Add your website origin to the "Allowed Origins" list
Enter the full origin of your website — scheme + domain, no trailing slash. Examples:
https://www.myboutique.com
https://myboutique.com
If your site is on both www and non-www, add both as separate entries.
Leave "Allowed Origins" empty during development. An empty list allows submissions from any origin, which is convenient for testing on 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.

HTML — honeypot field (add inside your <form>)
<!-- 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.

HTML — submission script (before </body>)
<!-- 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>
The token is visible in your page source — that's expected. The token is designed to be public-facing (like a Stripe publishable key). It's protected by your allowed-origins restriction and rate limiting. Never use your BizBotify account password or API key here.

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.
email 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.

Combine first name + last name into one field. If your form has separate fname and lname inputs, concatenate them before submitting. Example: payload.name = [data.fname, data.lname].filter(Boolean).join(' ');

Example: a typical contact form

HTML — example 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.

Open your website and submit the form
Fill in a name, phone number and any custom fields, then click submit. The form should behave normally — your own success message appears.
Check the Leads module in BizBotify
Go to Leads in your dashboard. A new lead with Source: Form Submission should appear within seconds. Open it to see the contact details and any custom fields you sent.
Check the browser console if nothing appears
Open DevTools → Console (F12). A failed fetch shows a network error. A CORS error means your origin is not in the allowed-origins list (or you haven't added your 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.
The endpoint always returns 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.

Token is pasted into the script — ft_live_YOUR_TOKEN replaced with your real token.
Your production domain (e.g. https://www.myboutique.com) is added to the token's Allowed Origins in the BizBotify dashboard.
Honeypot <input name="_hp"> is present inside the <form>.
FORM_ID in the script matches the id attribute of your <form> element.
Your form collects at least one of email or phone — otherwise BizBotify cannot create a contact.
A test submission appears in Leads with Source = Form Submission.
You see the lead's custom fields panel showing the extra data you sent.
Rate limits: Each token allows up to 100 submissions per hour by default. You can raise this limit in the token settings (Leads → Form Tokens → Edit). There is also a global cap of 200 submissions per hour per IP address across all tokens to protect against abuse.
Need help setting this up?

Book a free 20-minute demo and we'll walk through the integration with you live — including mapping your specific form fields and testing the lead flow end to end.

Book a Free Demo