Everything on this page is generated for you under Settings → Website Leads. Copy the snippet from there — this page explains what it does and how to customize it.
How it works
The Website Leads settings page 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 expects four element IDs —crm-name, crm-phone, crm-email, and a submit button crm-lead-btn:
Don’t assemble the URL by hand. Open Settings → Website Leads, copy the Endpoint URL field (it already includes your workspace’s host and lead token), and paste it in place of
YOUR_ENDPOINT_URL. The page also offers a one-click Copy for the full snippet.Posting directly
If you’d rather call the endpoint yourself instead of using the snippet, POST a JSON body to your Endpoint URL (copied from Settings → Website Leads). The token is already baked into that URL as the?token= query parameter; alternatively you can send a bare endpoint and pass the token in an x-lead-token header.
Fields
A successful submission returns
{ "ok": true, "lead_id": ... }. On failure the response is { "ok": false, "error": "..." } — common errors include invalid_token, missing_token_header, and tenant_not_resolved.
Booking API vs. lead capture
Use lead capture when you just want inquiries to flow into the CRM. Use the Booking API when you want customers to pick a service and book a real appointment time on your own site.