Skip to content

Advanced: Connecting a Form by Webhook

A webhook lets a form or a tool such as Zapier send each submission straight into Leads. This page is for whoever looks after your website.

  1. Go to Settings → Integrations and click Leads.
  2. Under Webhook, copy the URL.
  3. Click Generate key and copy the Key straight away. It is shown only once.

The Leads settings with email capture on, and the webhook URL and key, with a warning to copy the key now

Give the URL and key to your web designer. Treat the key like a password.

Send a POST to the URL with:

  • the header X-Lead-Key: <your key>
  • a JSON body with any of these fields:
FieldWhat goes in it
firstNameFirst name
lastNameLast name
emailEmail address
phonePhone number
propertyNameProperty name, if they gave one
addressOne line, or { "street", "line2", "city", "region", "postalCode", "country" }
messageWhat they wrote
sourcewebsite, email, phone, referral, realestateagent (Real Estate Agent), api or other (default website)
externalSubmissionIdYour form’s own ID for the submission. If it is sent twice, only one lead is made.

A first name or last name is required. Without one, the submission is refused.

Example:

{
"firstName": "Margaret",
"lastName": "Collins",
"email": "margaret.collins@example.com",
"phone": "(239) 555-0142",
"address": "418 Gulf Shore Blvd, Naples FL 34102",
"message": "We need weekly checks from May to October.",
"externalSubmissionId": "form-1234"
}
AnswerMeaning
201Lead created.
200 with "duplicate": trueAlready received this externalSubmissionId. No new lead.
401Key missing or wrong.
422No first or last name. Nothing was created.
429More than 60 leads in an hour. Try again later.
  • Rotate gives you a new key. The old one stops working at once, so update your form.
  • Revoke turns the webhook off until you generate a new key.

Can I see the key again? No. Click Rotate to get a new one.

Does a webhook lead send the “New lead” email? Yes, to your company’s primary user, the same as an email lead.