Skip to content

Lead webhook ​

Last reviewed

Use this when your website already has its own forms, or you use a form builder or an automation tool like Zapier or Make. Each location has its own URL and API key.

Leads arrive as Website Form leads, go through your new-lead workflows, and notify staff like any other lead.

Setup ​

WhereLeads > Lead Form > Lead Webhook

  1. Copy the Webhook URL.
  2. Press Generate key and copy the key straight away. It's only shown once, and only a hash is stored.
  3. Give both to whoever builds your forms. They send the key from their server in a header:
http
Authorization: Bearer <key>

X-Api-Key: <key> also works.

Keep the key out of browser code

Anyone who has the key can create leads. Send it from a server or your automation tool, never from JavaScript on your web page.

Replacing or revoking the key stops the old one working straight away.

Sending a lead ​

POST JSON to the webhook URL. Only an email or a phone number is required.

json
{
  "firstName": "Jane",
  "lastName": "Citizen",
  "email": "jane@example.com",
  "phone": "0400 000 000",
  "formName": "Enquiry",
  "interest": "Personal training",
  "message": "Keen to start next week",
  "tags": ["spring-promo"],
  "fields": { "Preferred time": "Mornings" },
  "utm_source": "google",
  "utm_medium": "cpc",
  "utm_campaign": "spring",
  "submittedAt": "2026-11-10T04:42:00Z",
  "externalId": "form-submission-8812"
}

Fields ​

FieldWhat happens to it
firstName, lastNameLead's first and last name
nameUsed when first and last are missing. The first word becomes the first name, the rest the last name. A one-word name gets - as the last name
emailLowercased. Also used to spot duplicates
phoneNormalised, so 0400 000 000, +61 400 000 000 and 400 000 000 all become +61400000000. If it can't be read, it's left off and the raw value goes in Notes. A lead is never rejected over phone format
phoneCountryCountry for numbers without a +, for example NZ. Default AU
leadSourceWALK_IN, PHONE_CALL, WEBSITE_FORM, SOCIAL_MEDIA, REFERRAL or OTHER. Default WEBSITE_FORM
formNameShown as the form name on the lead, and in Notes
interestNotes ("Interested in"). Send a readable label, not a code
messageNotes ("Message")
tagsAdded to the lead, lowercased and hyphenated
fieldsExtra answers as { "Label": "value" }, one line each in Notes
utm_source, utm_medium, utm_campaign, utm_content, utm_termCampaign attribution. camelCase (utmSource) works too
gclid, fbclidUsed to tell Google from Meta when there are no UTMs
submittedAtWhen the form was sent (ISO 8601). Shown in the location's timezone
externalIdYour own submission ID. Retries with the same ID are ignored
emailConsent, phoneConsenttrue or false, to override the defaults below

Without consent fields, email contact is allowed, and phone contact is allowed only if a phone number was sent. Explicit true or false values win, but phone contact is never turned on without a number.

Duplicates ​

A lead with the same email at the same location is a duplicate, however old it is. Its name, phone, source and consent aren't changed. The new submission is added as a note on the lead's timeline, and any new tags are added.

Responses ​

StatusMeaning
200Received. status is created, duplicate_email, or duplicate_external (a retry), with the leadId
400Not a JSON object, or no valid email or phone
401Missing, wrong or revoked key, or a key for another location
404No active lead form for that location
500Server error. Safe to retry if you sent externalId

Zapier and Make ​

Use the tool's webhook or HTTP action:

  • Method POST, the webhook URL, body type JSON
  • A header Authorization with the value Bearer <key>
  • Map your form's answers to the fields above

Questions? Contact your One Health onboarding lead or support.