Lead capture API

Post a lead from your own page: the endpoint, the body, the errors, the webhook.

Your own landing page can post a lead straight into Monody. Every workspace exposes one endpoint: POST https://<your-workspace>.monody.app/api/v1/leads. There is no API key for this call: the form's origin allowlist and its bot check protect it. Open the form in Monody (Marketing → Lead forms → the form → Integrate) for a copy-ready example prefilled with the form id.

Body, as JSON: formId (uuid, required); firstName and lastName (strings up to 120); email (lower-cased); phone (as typed — 604-555-0123 is accepted and stored as +16045550123); consent as { marketingEmail, marketingSms } booleans; utm as a map of the utm_ parameters the page received; child as { firstName, age } (optional — who it is for; it lands on the lead's Children); tags (up to 20 — e.g. a funding interest the parent ticked); locationId (optional — the form's own location wins when it is set); turnstileToken when the form's bot protection is on.

On success the endpoint answers 201 with the lead id; the lead lands in New and in the call queue, and the workspace's instant-response automation answers the parent within a minute when messaging is configured.

Every refusal is one shape: { error: { code, message, field? } }. Codes: validation_failed (with field), origin_not_allowed, form_not_found, rate_limited, tenant_inactive. The message is written for the person filling the form — show it beside the field.

Read the form first: GET https://<your-workspace>.monody.app/api/v1/lead-forms/<form id> (public, no key) returns the offer, the centre's name, street and phone, the fields, and the consent wording with its version — render your page from it so the words on your page never drift from what Monody records. A lead posted from your own page lands with the source "Landing page"; one from Monody's hosted page as "Web form", so Insights separates the two.

Webhooks: subscribe to lead.created under Account → Webhooks to be told when a lead lands. Reading leads back needs an API key (Account → API keys).