Everything on this page is generated under Settings → Website Integration → Website Leads → Website Forms. Copy the snippet from there — this page explains what it does and how to customize it.
How it works
The Website Forms workspace gives you two things:- Your lead token — an opaque token that identifies your workspace.
- An embed snippet — a small
<script>that POSTs your form fields to the lead-capture endpoint when a button is clicked.
The embed snippet
The snippet wires a button on your page to the lead endpoint. It reads five fields by element ID —crm-name, crm-phone, crm-email, crm-service, and crm-message — and fires on a button with the ID crm-lead-btn. Fields you leave out of your form are sent empty.
CRM lead error.
Don’t assemble the URL by hand. Open Settings → Website Integration → Website Leads → Website Forms, copy Endpoint URL, and paste it in place of
YOUR_ENDPOINT_URL.WordPress with Contact Form 7
Contact Form 7 needs its own snippet because it submits over AJAX rather than a normal button click. Website Forms provides it — paste it into WordPress once and it listens to every Contact Form 7 form on the site.This snippet covers Contact Form 7 only. Other form plugins and plain HTML forms need the standard embed snippet above. It also guards against being installed twice, so a duplicate paste won’t send every lead twice.
You probably don’t need to rename your fields
The snippet recognises the field names people actually use in Contact Form 7, so an existing form usually works untouched:
Matching ignores case, dashes, and underscores —
Your_Name and your-name are the same field.
Everything else still reaches you
A field the snippet doesn’t recognise isn’t dropped. It’s appended to the lead’s message under a Fields: heading, with the field name tidied into a readable label. So a custom “Preferred contact time” question arrives in the lead even though there’s no column for it. Skipped entirely: submit buttons, consent and acceptance checkboxes, quiz fields, CAPTCHA tokens (hCaptcha, reCAPTCHA), and Contact Form 7’s own internal fields.Which submissions are forwarded
Contact Form 7 fires its submit event on every attempt, including the ones it rejects itself. The snippet filters on that outcome:
Without that filter, a visitor who mistypes a field would create a junk lead on every retry, and spam your site already blocked would still reach the CRM.
Leads from this snippet arrive with
source set to wordpress-contact-form, so you can tell them apart from the standard embed, which uses website. If a submission carries no usable values at all, the snippet skips it and logs a warning to the browser console instead of creating an empty lead.
WooCommerce orders
Selling jobs through a WooCommerce store is a separate integration with its own delivery URL, its own secret, and HMAC signature verification. It doesn’t use the lead token.WooCommerce webhooks
Set up the webhook, verify signatures, and see what arrives in the lead.
Posting directly
If you’d rather call the endpoint yourself instead of using the snippet, POST a JSON body to the Endpoint URL copied from Settings → Website Integration → Website Leads → Website Forms. The token is already baked into that URL as the?token= query parameter, so the simplest call needs no extra headers.
The endpoint accepts the token two ways:
A request with no token in either place returns
401 with { "success": false, "error": "Missing lead token" }. A token that doesn’t resolve to a workspace returns 401 with "Invalid lead token".
Fields
Response
A successful submission returns200 with:
{ "success": false, "error": "..." }, where error is a human-readable message rather than a code:
Booking API vs. lead capture
Use lead capture when you just want inquiries to flow into the CRM. Use the shared native runtime for the supported booking experience on a bespoke website. Build directly against the Booking API only when you need a fully custom client.