Leads
Read the leads of a Vestta workspace and send new leads from your forms and services.
On this page
A lead is a contact the agency works with: someone looking to buy or rent (demandante), an owner (propietario), or a partner such as another agency, a bank or a service provider. Leads carry contact details and, for people searching, search preferences that Vestta uses to match them against the property catalogue.
Endpoints
- GET
/v1/ext/leadsList leads - POST
/v1/ext/leads/ingestIngest a rental lead - POST
/v1/ext/leads/inquiriesCreate an inquiry
Choosing an endpoint
The two POST endpoints both create a lead, from different payloads and with different rules. Reading the differences once saves surprises later:
Use Create an inquiry for new integrations: you control the lead type and preferences, you get the ID back, and duplicates are reported explicitly. Ingest a rental lead exists for rental landing pages that already send its compact format.
List leads is read-only and needs the separate leads:read scope.
What happens after a lead is created
Both POST endpoints respond as soon as the lead is stored. Then, in the background, Vestta:
- Matches the lead against the property catalogue, using its search preferences.
- Contacts the lead on WhatsApp, if the workspace has WhatsApp connected: one approved template message, sent once per lead, after which the Vestta assistant can carry on the conversation when the lead replies.
- For inquiries only, schedules follow-ups. For people searching, every 30 days if they want to rent and every 90 days if they want to buy or take over a business, based on the operations in
search_preferences; for other lead types, according to the workspace's follow-up rules.
None of this changes the response. If WhatsApp is not connected, the lead is still created.
Phone numbers
The primary phone identifies a lead within a workspace: two leads cannot share it. Send numbers in international format, such as +34600111222. Numbers without a prefix are read as Spanish, and numbers that are not valid phone numbers are rejected with 422.
The lead object
List leads returns lead objects with these fields. Fields without a value are omitted.
idintegerrequiredNumeric lead ID.
namestringtypestringdemandante(looking for a property),propietario(owner),agencia-inmobiliaria,entidad-bancariaorproveedor-servicios.statusstringPipeline status, e.g.
new,searching_property,active_negotiation,closedorinactive.activebooleansourcestringWhere the lead came from, e.g.
web,manual, or thesourcesent on ingestion.phone_number_1stringPrimary phone in E.164 format.
phone_number_2stringlandline_phonestringpersonal_emailstringprofessional_emailstringpreferred_languagestringes,gb,fr,georit.search_preferencesanyWhat the lead is looking for (same shape as
search_preferencesin Create an inquiry), without internal notes.created_atstringISO 8601 timestamp with UTC offset. Leads are ordered by this field, newest first.
updated_atstringISO 8601 timestamp with UTC offset.