Skip to main content
POST https://api.vflo.app/api/public/lead/create If the workspace already has an open lead with the same email, that lead is updated instead of duplicated (see Updating an existing lead). Retrying the same call is therefore safe.
An invalid value in any field returns 400 with a message naming the field, and nothing is written. Returns 201 with data.id for a new lead. Its Inbounded and Last activity are both set to the time of the call. Store the ID to create tasks or notes for this lead.

Updating an existing lead

When the email matches an open lead in the workspace, the call updates that lead and returns 200 with data.id, data.updated: true and data.updatedFields. Leads converted to a client and leads in Closed-Won or Closed-Lost are not matched, so a new booking from them creates a new lead. With several open leads, the most recently active one is updated. Clients are never matched.
  • Stage, case type, primary interest, fee, consultation time and dates are replaced with the values you send. Resending a stage also re-applies its status and, for Closed-Won, the won date.
  • Source, assignees and country of residence only fill blanks, so first-touch attribution and staff assignments are kept. An empty assigneeIds list counts as not sent.
  • Name, phone, address and preferred language only fill blanks on the lead’s contact.
  • customFields are merged into the lead’s existing ones.
  • Last activity moves to now. Inbounded (the lead’s creation time) is unchanged.
  • A note on the lead lists what was updated, including the address and custom values you sent.
Stage, source and case-type labels are matched as labels even when they contain / (for example "Spousal/Common-law"). “Closed Won” matches the Closed-Won stage. Labels are limited to 100 characters.