Ingest a rental lead
Create a rental-seeking lead from the compact payload used by rental landing forms.
/v1/leads/ingestRequires the leads:ingest scope
On this page
Creates a lead of type demandante from a rental form submission, with a readable summary in its notes and a tenant profile. General search forms also create a search request from the criteria sent, even when partial. Forms about a specific property (propertyId) save the candidacy without creating a general search request. For full control over the lead, use Create an inquiry instead.
How the payload is used
All new leads have rating 3 and high urgency (alta-urgencia). Without propertyId, sending a budget, bedroom count or location creates a general residential search with operation alquiler and property types apartamento and casa; missing criteria remain unset. A profile alone (income, employment, pets, occupants or dates) does not create a search request. Leads without a search request start with status new; those with one start with searching_property.
Tenant profile and rental applications
Each lead keeps one tenant profile, which Vestta compares with the requirements of every rental the agency is marketing. It is filled from:
search.people(a number of occupants),search.pets(No,Sí,Sí, un gato…),search.workSituation(Contrato indefinido,Autónomo,Estudiante…),search.entryDateandsearch.exitDate(asYYYY-MM-DD, for the move-in date and the length of stay). A value Vestta cannot read is left out of the profile, never guessed.tenant, when you send it. Its fields always win over what was read fromsearch, and it is the only way to send the household's net monthly income (monthlyIncome), smokers, a guarantor or the contact's consent to hear about other rentals (benchConsent).
With propertyId, the contact is added as a candidate of that property's open rental and rated against its requirements right away. If the property has no open rental, or the lead cannot be a tenant, the lead is still created and nothing else happens: the request does not fail.
Duplicates
If the workspace already has a lead with the same primary phone, nothing is created and the response is still 200, without a lead ID. The existing lead is not updated, except for its tenant profile and, with propertyId, its rental application: answers are merged into the profile and the contact is added as a candidate unless they already are. This makes retries safe.
If no phone field holds a valid number, the request fails with 422 and the message Invalid phone number. Use international format, e.g. +34600111222.
Example request
curl -X POST "https://api.vestta.io/v1/leads/ingest" \
-H "X-Api-Key: $VESTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "web-123",
"createdAt": "2026-09-22T10:30:00Z",
"source": "web",
"sourcePage": "https://example.com/alquiler",
"contact": {
"name": "Ana García",
"phone": "+34600111222"
},
"search": {
"budget": "900-1200",
"entryDate": "2026-10-01",
"exitDate": "2027-09-30",
"people": "2",
"area": "Madrid centro",
"habs": "2",
"pets": "No",
"workSituation": "Contrato indefinido",
"location": {
"name": "Madrid"
},
"freeText": "Preferimos una vivienda amueblada"
}
}'Authorization
X-Api-KeystringheaderrequiredYour API key,
AC_LIVE_<key_id>.<secret>.Authorization: ApiKey <key>is also accepted.
Request body
application/json · required
idstringrequiredYour identifier for the submission. Required, but not stored by Vestta.
createdAtstringrequiredWhen the form was submitted, ISO 8601. Required, but not stored by Vestta.
sourcestringrequiredWhere the lead comes from, e.g.
web. Stored as the lead source.sourcePagestringrequiredURL of the page with the form. Added to the lead notes.
contactRentingLeadContactrequiredsearchRentingLeadSearchrequiredtenantRentingLeadTenantStructured tenant data. Stored as the contact's tenant profile, which rates them against each rental's requirements.
propertyIdinteger≥ 1Vestta property the form was about. When it has an open rental, the contact becomes a candidate of it. No general search request is created for a property-specific submission, even without an open rental.
Response
200 Successful response.
Response fields
statusstringrequired alwaysokauthenticated_asstringName of the business that owns the API key.
Errors
Error bodies and how to handle each case: Errors.