Payloads

The exact request Zoie's Send webhook step makes, field by field, and what Zoie's two inbound endpoints accept: the workflow Webhook trigger with its field mapping and the website lead webhook with its field list, with every response.

This page describes the three webhook surfaces in Webhooks overview at the level of the bytes on the wire.

Outgoing: Send webhook

When a run reaches a Send webhook step, Zoie makes one HTTP request to the step’s URL.

Request

PartValue
MethodPOST or PUT, as chosen on the step. POST if not set.
URLExactly as entered. It must be https:// and resolve to a public address. See Security.
Content-Typeapplication/json
X-Zoie-Webhook-SecretThe step’s Secret, sent as-is. Only present when a secret is set.

Other headers, such as User-Agent, are the HTTP client’s defaults and can change. The URL, headers and body can’t be customised, and the step has no placeholders.

Body

{
  "event": "workflow.action.webhook",
  "workflow": {
    "id": 87,
    "name": "New leads to our CRM"
  },
  "sent_at": "2026-10-02T09:14:09.120Z",
  "lead": {
    "id": 18342,
    "business_id": 42,
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone_number": "+15551234567",
    "lead_status": "New",
    "lead_source": null,
    "labels": "VIP, Implants"
  }
}
FieldTypeDescription
eventstringAlways workflow.action.webhook, whatever the trigger.
workflow.idintegerThe workflow’s ID. It stays the same for the workflow’s life, so use it to route calls.
workflow.namestringThe workflow’s name when the call was made.
sent_atstringWhen Zoie built the request, ISO 8601 in UTC.
lead.idintegerThe lead’s Zoie ID. Use it with the MCP get_lead tool to fetch more.
lead.business_idintegerThe business the lead belongs to.
lead.first_name, lead.last_namestring or nullCan be an empty string when the lead has no name yet, for example an anonymous widget visitor.
lead.emailstring or nullCan be an empty string.
lead.phone_numberstring or nullAs stored on the lead, usually E.164 such as +15551234567. Can be an empty string.
lead.lead_statusstring or nullThe status when the step ran.
lead.lead_sourcenullCurrently always null. The lead’s source isn’t included in the payload.
lead.labelsstring or nullThe lead’s labels as one comma-separated string, for example "VIP, Implants". Split on commas and trim each label.

The lead is read when the step runs, so the values reflect any earlier steps and waits in the same run. Nothing else is sent: no custom fields, appointment details, conversation or the trigger that started the run. To get more, look the lead up by lead.id through the MCP server.

Your response

Your endpoint returnsZoie records
Any status below 400, within 10 secondsThe step succeeded, with Webhook sent to your host and the status. A 3xx counts as success but isn’t followed.
400 or aboveThe step failed with Webhook returned and the status. The run stops.
No response within 10 seconds, or a connection or TLS errorThe step failed. The run stops.

Zoie ignores the response body. It doesn’t retry by itself. Someone can rerun the failed step from the workflow’s Executions tab with Retry failed step, which sends the request again with a new sent_at.

Incoming: workflow Webhook trigger

A workflow whose trigger is Webhook has its own URL. Open the trigger in the builder to see it. A saved workflow gets its URL the first time the trigger panel is opened, and Rotate replaces it.

POST https://api-us.zoie.ai/api/v1/auth/webhooks/trigger/wf_<48 hex characters>
Content-Type: application/json

Request

RuleDetail
MethodPOST
BodyA JSON object (application/json) or form fields (application/x-www-form-urlencoded). Any other content type arrives as an empty body.
SizeUp to 64 KB, measured as the JSON of the received body.
AuthenticationNone beyond the URL. See Security.
CallerA server or automation tool. Browsers on other websites can’t read the response.

Zoie keeps the most recent body as the trigger’s sample, even when the workflow isn’t live yet. Send one realistic request, click Fetch sample in the trigger, and the builder lists the fields it received so you can map them.

Responses

StatusBodyMeaning
202{ "received": true, "ran": true }Queued to run. The response has no lead ID, and the run can still stop later, for example on the daily limit or a missing email and phone.
202{ "received": true, "ran": false, "reason": "workflow not live" }Saved as the sample only. The workflow is a draft or paused.
404{ "message": "Not found" }No workflow has this token. It was mistyped, rotated, or the workflow was deleted.
413{ "message": "Payload too large" }The body is over 64 KB.
429See Rate limitsToo many requests from your IP address.
500{ "message": "Failed to accept webhook" }Zoie couldn’t store or queue the request. Try again.

Mapping the body to a lead

A Webhook run starts with no lead. A Create lead step with Create lead from set to Incoming webhook payload builds one using its Map fields table. Each row maps a path in the body to a lead field:

Lead field in the builderNotes
First Name, Last Name
Email, Phone NumberAt least one must be mapped and present. Without either, the run fails with Payload carried neither an email nor a phone number to map. Send phone numbers in E.164, for example +15551234567, so the lead can be texted.
Company, Job Title, Website
Service, Notes, Location
UTM Source, UTM Medium, UTM CampaignUTM Source is set to Webhook when you don’t map it.
  • Nested fields. Map nested objects with dotted paths, for example contact.email for { "contact": { "email": "…" } }. The builder doesn’t list paths inside arrays.
  • Values. Values are turned into text and trimmed. An object mapped to a field is stored as its JSON. Empty values are skipped.
  • Unmapped fields are ignored. The Create lead step can’t write custom fields.

If the lead already exists decides what happens when the lead is already in the business:

OptionMatches on
Match on email (default)The email, ignoring case.
Match on phone numberThe phone number exactly as stored, so the formats must agree.
Always create a new leadNothing. Every request creates a lead.

A matched lead is used as it is: the request doesn’t update its fields. A new lead gets the status New and the step’s Lead Source, which defaults to Web_Lead. After that the run carries on like any other, and the workflow’s Run Frequency is applied to the lead. See Triggers and actions.

Incoming: website lead webhook

An older endpoint that some website form plugins post to. It identifies the business by a website identifier in the body, not by a credential. Read Security before using it, and prefer the Forms API or a Webhook trigger for new integrations.

POST https://api-us.zoie.ai/api/v1/auth/form-leads-webhook
Content-Type: application/json

The body can be JSON or form fields. Every request that passes the checks creates a lead with the type Form_Lead and the status New.

Fields

KeyBecomes
website_user_nameRequired. The identifier of a website registered on your business. Zoie support gives you this value. The lead goes to that website’s business.
first_name, last_nameName
emailEmail. Spaces before the @ are removed, which repairs a + that form encoding turned into a space.
phone_numberPhone number, stored as sent. Use E.164.
treatmentService
treatment_valueService value. Defaults to "0". A service_value key is ignored.
currency_codeCurrency of the service value
messageMessage
note_for_doctorNotes
website_nameWebsite name
utm_sourceUTM source. Also sets the lead’s platform: Facebook for facebook, Tiktok for Tiktok, otherwise Google.
utm_medium, utm_campaign, utm_term, utm_adgroup, utm_matchtype, utm_device, utm_networkCampaign tracking
gclid, gcld_google, gbraid, wbraidGoogle Ads click IDs
consent_stateConsent state
ip_addressThe visitor’s IP address, used for the block-list check
location, geo_zip, geo_latitude, geo_longitude, geo_location, user_location, user_zipLocation fields
createdtime, modifiedtimeThe lead’s created and updated times. Default to now.
creditscoreCredit score
finance_score, annual_salary, co_signer, home_ownerFinancing fields. annual_salary defaults to 0.
email_verify, phone_verify, unique_id, how_to_contact, assign_to, form_statusStored as sent
missingteeth, methodcomm, methodtime, whatage, activeinfection, hearaboutus, dentalinsu, medicalinsuDental-intake fields, stored as sent

Any other key is saved to a lead custom field whose name matches it, ignoring case, if the business has one that’s active. A key that matches no custom field is dropped, and so is a key named after a lead field that isn’t in the table above, such as company_name.

What Zoie does with a request

  1. Finds the website by website_user_name. An unknown or missing value returns 404.
  2. Checks the phone number and ip_address against the business’s blocked contacts.
  3. If duplicate-lead handling is on for the business, compares the email and phone number with its existing leads. A lead matching both is marked duplicate, one matching either is marked related, and either way it joins that lead’s group. The new lead is created regardless.
  4. Creates the lead and saves any custom-field values.
  5. Starts New Lead Added workflows, sends new-lead notifications to the team, logs the activity and starts AI outreach according to the business’s agents and AI settings.

Responses

The responses have no success field.

StatusBodyMeaning
201{ "message": "Lead stored successfully", "id": 18342 }The lead was created. id is its Zoie ID.
400{ "message": "Validation error", "errors": ["…"] }A value was rejected by the database, for example too long for its field.
403{ "message": "This lead is blocked." }The phone number or IP address is blocked for the business.
404{ "message": "Website details not found" }website_user_name is missing or unknown.
404{ "message": "No user Business details found" }The business has no team members.
409{ "message": "Duplicate entry detected", "error": "…" }A unique value clashed with an existing record.
429See Rate limitsToo many requests from your IP address.
500{ "message": "Failed to store lead due to a server error", "error": "…" }Other 500 messages include Error creating lead and Error fetching required data.