Skip to main content
This guide shows you how to capture a lead using the Enquiries API. Enquiries let you record prospective tenants from your own website, portal, or CRM, collect their qualification details, and move them through your pipeline towards an application.

Prerequisites

Before creating an enquiry, ensure you have:
  • The Leads product enabled on your account.
  • A secret key.
  • A qualification configuration ID, if you want to collect qualification answers.
Your secret key can perform any action on your account, so only ever use it from your own server. Never put it in browser JavaScript, a mobile app, or a public repository, and never send it to a lead.To collect details directly from a lead, send them a hosted qualification form or embed the form on your website rather than calling the API from the browser. Those pages authenticate themselves with a short-lived key scoped to a single configuration or enquiry, so your secret key never leaves your server. If a secret key is ever exposed, roll it immediately.

Permissions

Create an enquiry

Every field is optional, so you can capture a lead from as little as an email address and fill in the rest later.
Create an enquiry
Response

Enquiry parameters

An enquiry created without qualification answers starts as new. An enquiry created with answers starts as pending, because there is something for your team to review.

Collect qualification answers

A qualification configuration defines the questions you ask a lead. You can build one in the Dashboard, or with the Qualification Configurations API. Each configuration exposes a hosted_qualification_url that a lead can complete in their browser — submitting it creates the enquiry for you. To put that same form on your own website, embed it with Yorlet.js. To collect answers against an enquiry that already exists, choose one of the approaches below.
Attach a configuration to the enquiry and let Yorlet host the form. Set notification.type to email to send the lead their link straight away.
Attach a qualification configuration
Retrieve the link at any time — it is created on first use and reused for the lifetime of the enquiry.
Create a qualification link
The response is a leads.enquiry_qualification_link object with the enquiry it belongs to and the url of the hosted form. Send that URL to the lead however you like — the hosted page handles its own authentication, so you never expose an API key to the lead.
An enquiry can only have one qualification configuration. Attaching a second one returns an error, so use the qualification link action when a configuration is already attached.

Standard answers

Read the score

Once answers are submitted, Yorlet scores them against the attached configuration and writes a short explanation. Retrieve the enquiry to read both, expanding the configuration if you need its questions too.
Retrieve an enquiry
Response
Scoring runs in the background, so score and reason are null for a short time after the first submission.

Move the enquiry through your pipeline

Use the status endpoint to progress a lead. Pass an optional reason to record why.
Qualify an enquiry
Transitions to qualified and disqualified record reviewed_at and reviewed_by on the enquiry. Moving to qualified also emails the lead their viewing booking link when the account has automatic booking links turned on.
Booking a viewing advances the enquiry to viewing for you, so you do not need to set that status yourself. See Book a viewing.

List and filter enquiries

List qualified enquiries
Enquiries are returned newest first, and assignee, unit, and qualification_configuration can each be expanded with expand[].

Route enquiries automatically

Rather than attaching a configuration on every create call, use the Qualification Routes API to attach one whenever a matching enquiry arrives. Leave a condition empty to match anything, and give your most specific routes the lowest priority.
Create a qualification route
Routing is skipped for enquiries that already have a configuration attached or that arrive with their answers submitted.