[{"data":1,"prerenderedAt":934},["ShallowReactive",2],{"page:\u002Fleads\u002Finquiries":3,"operation:createLeadInquiry":452},{"id":4,"title":5,"body":6,"description":442,"extension":443,"meta":444,"navigation":445,"operation":446,"path":447,"rawbody":448,"seo":449,"stem":450,"__hash__":451},"docs\u002Fleads\u002Finquiries.md","Create an inquiry",{"type":7,"value":8,"toc":435},"minimark",[9,13,18,25,101,104,108,114,250,327,337,341,350,354,396,400,403,431],[10,11,12],"p",{},"Creates a lead from a contact form or any external service, with the contact details and search preferences you provide. This is the recommended way to send leads to Vestta.",[14,15,17],"h2",{"id":16},"lead-type","Lead type",[10,19,20,24],{},[21,22,23],"code",{},"type"," accepts Vestta's lead types and a few English and Spanish aliases:",[26,27,28,41],"table",{},[29,30,31],"thead",{},[32,33,34,38],"tr",{},[35,36,37],"th",{},"You send",[35,39,40],{},"Stored as",[42,43,44,70,85],"tbody",{},[32,45,46,65],{},[47,48,49,52,53,52,56,52,59,52,62],"td",{},[21,50,51],{},"buyer",", ",[21,54,55],{},"tenant",[21,57,58],{},"comprador",[21,60,61],{},"inquilino",[21,63,64],{},"demandante",[47,66,67,69],{},[21,68,64],{}," — looking to buy or rent",[32,71,72,80],{},[47,73,74,52,77],{},[21,75,76],{},"owner",[21,78,79],{},"propietario",[47,81,82,84],{},[21,83,79],{}," — owns a property",[32,86,87,98],{},[47,88,89,52,92,52,95],{},[21,90,91],{},"agencia-inmobiliaria",[21,93,94],{},"entidad-bancaria",[21,96,97],{},"proveedor-servicios",[47,99,100],{},"Unchanged",[10,102,103],{},"Matching is case-insensitive. Any other value fails.",[14,105,107],{"id":106},"search-preferences","Search preferences",[10,109,110,113],{},[21,111,112],{},"search_preferences"," is a list of searches. Each entry has the operations and property types the lead wants, optional criteria per property type, and locations:",[115,116,121],"pre",{"className":117,"code":118,"language":119,"meta":120,"style":120},"language-json shiki shiki-themes github-light","{\n  \"operations\": [\"alquiler\"],\n  \"property_types\": [\"apartamento\", \"casa\"],\n  \"apartamento\": { \"bedrooms_min\": 2, \"price_rent_max\": 1200 },\n  \"casa\": { \"bedrooms_min\": 3, \"price_rent_max\": 1500 },\n  \"locations\": [{ \"name\": \"Madrid\" }]\n}\n","json","",[21,122,123,132,149,167,198,224,244],{"__ignoreMap":120},[124,125,128],"span",{"class":126,"line":127},"line",1,[124,129,131],{"class":130},"sgsFI","{\n",[124,133,135,139,142,146],{"class":126,"line":134},2,[124,136,138],{"class":137},"sYu0t","  \"operations\"",[124,140,141],{"class":130},": [",[124,143,145],{"class":144},"sYBdl","\"alquiler\"",[124,147,148],{"class":130},"],\n",[124,150,152,155,157,160,162,165],{"class":126,"line":151},3,[124,153,154],{"class":137},"  \"property_types\"",[124,156,141],{"class":130},[124,158,159],{"class":144},"\"apartamento\"",[124,161,52],{"class":130},[124,163,164],{"class":144},"\"casa\"",[124,166,148],{"class":130},[124,168,170,173,176,179,182,185,187,190,192,195],{"class":126,"line":169},4,[124,171,172],{"class":137},"  \"apartamento\"",[124,174,175],{"class":130},": { ",[124,177,178],{"class":137},"\"bedrooms_min\"",[124,180,181],{"class":130},": ",[124,183,184],{"class":137},"2",[124,186,52],{"class":130},[124,188,189],{"class":137},"\"price_rent_max\"",[124,191,181],{"class":130},[124,193,194],{"class":137},"1200",[124,196,197],{"class":130}," },\n",[124,199,201,204,206,208,210,213,215,217,219,222],{"class":126,"line":200},5,[124,202,203],{"class":137},"  \"casa\"",[124,205,175],{"class":130},[124,207,178],{"class":137},[124,209,181],{"class":130},[124,211,212],{"class":137},"3",[124,214,52],{"class":130},[124,216,189],{"class":137},[124,218,181],{"class":130},[124,220,221],{"class":137},"1500",[124,223,197],{"class":130},[124,225,227,230,233,236,238,241],{"class":126,"line":226},6,[124,228,229],{"class":137},"  \"locations\"",[124,231,232],{"class":130},": [{ ",[124,234,235],{"class":137},"\"name\"",[124,237,181],{"class":130},[124,239,240],{"class":144},"\"Madrid\"",[124,242,243],{"class":130}," }]\n",[124,245,247],{"class":126,"line":246},7,[124,248,249],{"class":130},"}\n",[251,252,253,270,310],"ul",{},[254,255,256,181,259,52,262,265,266,269],"li",{},[21,257,258],{},"operations",[21,260,261],{},"venta",[21,263,264],{},"alquiler"," and\u002For ",[21,267,268],{},"traspaso",".",[254,271,272,181,275,52,278,52,281,52,284,52,287,52,290,52,293,52,296,52,299,302,303,306,307,269],{},[21,273,274],{},"property_types",[21,276,277],{},"apartamento",[21,279,280],{},"casa",[21,282,283],{},"local",[21,285,286],{},"nave",[21,288,289],{},"almacenaje",[21,291,292],{},"oficina",[21,294,295],{},"terreno",[21,297,298],{},"aparcamiento",[21,300,301],{},"edificio",". Criteria for each type go in the object of the same name, such as ",[21,304,305],{},"apartamento.price_rent_max"," or ",[21,308,309],{},"casa.price_max",[254,311,312,315,316,319,320,269],{},[21,313,314],{},"locations",": places by ",[21,317,318],{},"name",", or map areas in the same shapes as the ",[321,322,324,326],"a",{"href":323},"\u002Fproperties\u002Flist#map-areas",[21,325,314],{}," filter",[10,328,329,330,333,334,269],{},"When at least one search has content, the lead is created with status ",[21,331,332],{},"searching_property","; otherwise with status ",[21,335,336],{},"new",[14,338,340],{"id":339},"notes","Notes",[10,342,343,344,347,348,269],{},"Vestta writes a summary of the inquiry into the lead notes — operations, property types, locations, origin page and your message — so agents can read it at a glance. Your message is taken from ",[21,345,346],{},"search_preferences[0].internal_notes"," if set, otherwise from ",[21,349,339],{},[14,351,353],{"id":352},"defaults-set-by-vestta","Defaults set by Vestta",[10,355,356,357,361,362,365,366,369,370,373,374,52,377,380,381,384,385,380,388,391,392,395],{},"Inquiries are always stored as ",[358,359,360],"strong",{},"active",", with ",[358,363,364],{},"rating 3"," and captured by ",[21,367,368],{},"Web",". ",[21,371,372],{},"profile_category"," defaults to ",[21,375,376],{},"potencial",[21,378,379],{},"urgency_profile"," to ",[21,382,383],{},"poca-urgencia"," and ",[21,386,387],{},"source",[21,389,390],{},"manual"," — send ",[21,393,394],{},"\"source\": \"web\""," or your site's name so agents know where the lead came from.",[14,397,399],{"id":398},"duplicates","Duplicates",[10,401,402],{},"The primary phone is unique within a workspace:",[251,404,405,420],{},[254,406,407,408,411,412,415,416,419],{},"If a lead with the same phone exists ",[358,409,410],{},"without a name"," (for example, someone who first wrote on WhatsApp), it is ",[358,413,414],{},"completed"," with this inquiry and its ",[21,417,418],{},"lead_id"," is returned.",[254,421,422,423,426,427,430],{},"If a lead with the same primary phone exists ",[358,424,425],{},"with a name",", the request fails with ",[21,428,429],{},"409",". Treat it as \"already in Vestta\": do not retry.",[432,433,434],"style",{},"html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":120,"searchDepth":151,"depth":151,"links":436},[437,438,439,440,441],{"id":16,"depth":134,"text":17},{"id":106,"depth":134,"text":107},{"id":339,"depth":134,"text":340},{"id":352,"depth":134,"text":353},{"id":398,"depth":134,"text":399},"Create a lead with contact details and structured search preferences, and get its ID back.","md",{},true,"createLeadInquiry","\u002Fleads\u002Finquiries","---\ntitle: Create an inquiry\ndescription: Create a lead with contact details and structured search preferences, and get its ID back.\noperation: createLeadInquiry\n---\n\nCreates a lead from a contact form or any external service, with the contact details and search preferences you provide. This is the recommended way to send leads to Vestta.\n\n## Lead type\n\n`type` accepts Vestta's lead types and a few English and Spanish aliases:\n\n| You send | Stored as |\n| --- | --- |\n| `buyer`, `tenant`, `comprador`, `inquilino`, `demandante` | `demandante` — looking to buy or rent |\n| `owner`, `propietario` | `propietario` — owns a property |\n| `agencia-inmobiliaria`, `entidad-bancaria`, `proveedor-servicios` | Unchanged |\n\nMatching is case-insensitive. Any other value fails.\n\n## Search preferences\n\n`search_preferences` is a list of searches. Each entry has the operations and property types the lead wants, optional criteria per property type, and locations:\n\n```json\n{\n  \"operations\": [\"alquiler\"],\n  \"property_types\": [\"apartamento\", \"casa\"],\n  \"apartamento\": { \"bedrooms_min\": 2, \"price_rent_max\": 1200 },\n  \"casa\": { \"bedrooms_min\": 3, \"price_rent_max\": 1500 },\n  \"locations\": [{ \"name\": \"Madrid\" }]\n}\n```\n\n- `operations`: `venta`, `alquiler` and\u002For `traspaso`.\n- `property_types`: `apartamento`, `casa`, `local`, `nave`, `almacenaje`, `oficina`, `terreno`, `aparcamiento`, `edificio`. Criteria for each type go in the object of the same name, such as `apartamento.price_rent_max` or `casa.price_max`.\n- `locations`: places by `name`, or map areas in the same shapes as the [`locations` filter](\u002Fproperties\u002Flist#map-areas).\n\nWhen at least one search has content, the lead is created with status `searching_property`; otherwise with status `new`.\n\n## Notes\n\nVestta writes a summary of the inquiry into the lead notes — operations, property types, locations, origin page and your message — so agents can read it at a glance. Your message is taken from `search_preferences[0].internal_notes` if set, otherwise from `notes`.\n\n## Defaults set by Vestta\n\nInquiries are always stored as **active**, with **rating 3** and captured by `Web`. `profile_category` defaults to `potencial`, `urgency_profile` to `poca-urgencia` and `source` to `manual` — send `\"source\": \"web\"` or your site's name so agents know where the lead came from.\n\n## Duplicates\n\nThe primary phone is unique within a workspace:\n\n- If a lead with the same phone exists **without a name** (for example, someone who first wrote on WhatsApp), it is **completed** with this inquiry and its `lead_id` is returned.\n- If a lead with the same primary phone exists **with a name**, the request fails with `409`. Treat it as \"already in Vestta\": do not retry.\n",{"title":5,"description":442},"leads\u002Finquiries","U0-NUMpGx5-osdINF_K5CLFSr2mn-vkCiLbB_-dhLZs",{"id":446,"method":453,"path":447,"fullPath":454,"summary":5,"tag":455,"scopes":456,"url":458,"description":459,"pathParams":460,"queryParams":461,"body":462,"responses":881,"samples":917,"docsPath":447},"POST","\u002Fv1\u002Fext\u002Fleads\u002Finquiries","Leads",[457],"leads:ingest","https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries","Creates a lead with full contact details and structured search preferences, as submitted by a contact form. Returns the ID of the created lead. Requires the `leads:ingest` scope.",[],[],{"schemaName":463,"required":445,"fields":464,"ignored":856},"LeadInquiryRequest",[465,470,474,477,480,483,487,491,495,499,503,507,510,514,517,831,836],{"name":318,"type":466,"required":445,"nullable":467,"description":468,"constraints":469},"string",false,"Contact's full name.",[],{"name":471,"type":466,"required":467,"nullable":445,"description":472,"constraints":473},"dni","National ID document number.",[],{"name":23,"type":466,"required":445,"nullable":467,"description":475,"constraints":476},"Lead type. `buyer`, `comprador`, `demandante`, `tenant` and `inquilino` are stored as `demandante`; `owner` and `propietario` as `propietario`. Other values must be a Vestta lead type (`agencia-inmobiliaria`, `entidad-bancaria`, `proveedor-servicios`).",[],{"name":372,"type":466,"required":467,"nullable":445,"description":478,"constraints":479},"`standard` or `potencial`. Defaults to `potencial`.",[],{"name":379,"type":466,"required":467,"nullable":445,"description":481,"constraints":482},"`alta-urgencia` or `poca-urgencia`. Defaults to `poca-urgencia`.",[],{"name":484,"type":466,"required":467,"nullable":445,"description":485,"constraints":486},"preferred_language","`es`, `gb`, `fr`, `ge` or `it`.",[],{"name":488,"type":466,"required":445,"nullable":467,"description":489,"constraints":490},"phone_number_1","Primary phone. Normalised to E.164: include the international prefix (`+34600111222`); numbers without one are read as Spanish.",[],{"name":492,"type":466,"required":467,"nullable":445,"description":493,"constraints":494},"phone_number_2","Secondary phone, normalised to E.164.",[],{"name":496,"type":466,"required":467,"nullable":445,"description":497,"constraints":498},"landline_phone","Landline, normalised to E.164.",[],{"name":500,"type":466,"required":467,"nullable":445,"description":501,"constraints":502},"personal_email","Personal email address.",[],{"name":504,"type":466,"required":467,"nullable":445,"description":505,"constraints":506},"professional_email","Work email address.",[],{"name":387,"type":466,"required":467,"nullable":445,"description":508,"defaultValue":390,"constraints":509},"Where the inquiry comes from, e.g. `web` or your site's name. Stored as the lead source; defaults to `manual`.",[],{"name":511,"type":466,"required":467,"nullable":445,"description":512,"constraints":513},"sourcePage","URL of the page where the inquiry was submitted. Added to the lead notes.",[],{"name":339,"type":466,"required":467,"nullable":445,"description":515,"constraints":516},"Free-text message. Vestta stores a generated summary of the inquiry as the lead notes and includes this text in it, unless `search_preferences[0].internal_notes` is set.",[],{"name":112,"type":518,"required":467,"nullable":467,"description":519,"constraints":520,"children":521},"array of objects","What the contact is looking for. All entries are stored and used for property matching; the first one is summarised in the notes.",[],[522,525,528,530,584,626,659,687,708,742,770,789,826,828],{"name":523,"type":466,"required":467,"nullable":445,"constraints":524},"request_id",[],{"name":258,"type":526,"required":467,"nullable":467,"constraints":527},"array of strings",[],{"name":274,"type":526,"required":467,"nullable":467,"constraints":529},[],{"name":277,"type":531,"required":467,"nullable":467,"constraints":532,"children":533},"ApartmentPreferences",[],[534,538,541,544,547,551,554,557,560,563,566,569,572,575,578,581],{"name":535,"type":536,"required":467,"nullable":445,"constraints":537},"specs","object",[],{"name":539,"type":526,"required":467,"nullable":445,"constraints":540},"views",[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":543},"features",[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":546},"subtypes",[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":550},"size_max","integer",[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":553},"size_min",[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":556},"price_max",[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":559},"price_min",[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":562},"price_rent_max",[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":565},"price_rent_min",[],{"name":567,"type":549,"required":467,"nullable":445,"constraints":568},"bedrooms_min",[],{"name":570,"type":549,"required":467,"nullable":445,"constraints":571},"bathrooms_min",[],{"name":573,"type":549,"required":467,"nullable":445,"constraints":574},"num_terraces_min",[],{"name":576,"type":549,"required":467,"nullable":445,"constraints":577},"size_terraces_min",[],{"name":579,"type":549,"required":467,"nullable":445,"constraints":580},"doble_bedrooms_min",[],{"name":582,"type":549,"required":467,"nullable":445,"constraints":583},"suite_bathrooms_min",[],{"name":280,"type":585,"required":467,"nullable":467,"constraints":586,"children":587},"HousePreferences",[],[588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,623],{"name":535,"type":536,"required":467,"nullable":445,"constraints":589},[],{"name":539,"type":526,"required":467,"nullable":445,"constraints":591},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":593},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":595},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":597},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":599},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":601},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":603},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":605},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":607},[],{"name":567,"type":549,"required":467,"nullable":445,"constraints":609},[],{"name":570,"type":549,"required":467,"nullable":445,"constraints":611},[],{"name":573,"type":549,"required":467,"nullable":445,"constraints":613},[],{"name":576,"type":549,"required":467,"nullable":445,"constraints":615},[],{"name":579,"type":549,"required":467,"nullable":445,"constraints":617},[],{"name":582,"type":549,"required":467,"nullable":445,"constraints":619},[],{"name":621,"type":549,"required":467,"nullable":445,"constraints":622},"plot_size_min",[],{"name":624,"type":549,"required":467,"nullable":445,"constraints":625},"porch_size_min",[],{"name":283,"type":627,"required":467,"nullable":467,"constraints":628,"children":629},"LocalPreferences",[],[630,632,634,636,638,640,642,644,646,648,651,654,657],{"name":535,"type":536,"required":467,"nullable":445,"constraints":631},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":633},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":635},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":637},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":639},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":641},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":643},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":645},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":647},[],{"name":649,"type":549,"required":467,"nullable":445,"constraints":650},"height_min",[],{"name":652,"type":549,"required":467,"nullable":445,"constraints":653},"facade_meters_min",[],{"name":655,"type":549,"required":467,"nullable":445,"constraints":656},"showcase_meters_min",[],{"name":570,"type":549,"required":467,"nullable":445,"constraints":658},[],{"name":286,"type":660,"required":467,"nullable":467,"constraints":661,"children":662},"NavePreferences",[],[663,665,667,669,671,673,675,677,679,681,683,685],{"name":535,"type":536,"required":467,"nullable":445,"constraints":664},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":666},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":668},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":670},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":672},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":674},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":676},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":678},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":680},[],{"name":649,"type":549,"required":467,"nullable":445,"constraints":682},[],{"name":652,"type":549,"required":467,"nullable":445,"constraints":684},[],{"name":655,"type":549,"required":467,"nullable":445,"constraints":686},[],{"name":289,"type":688,"required":467,"nullable":467,"description":689,"constraints":690,"children":691},"StoragePreferences","Preferencias para almacenes y trasteros independientes.",[],[692,694,696,698,700,702,704,706],{"name":542,"type":526,"required":467,"nullable":445,"constraints":693},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":695},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":697},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":699},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":701},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":703},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":705},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":707},[],{"name":292,"type":709,"required":467,"nullable":467,"constraints":710,"children":711},"OficinaPreferences",[],[712,714,716,718,720,722,724,726,728,730,733,735,738,740],{"name":535,"type":536,"required":467,"nullable":445,"constraints":713},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":715},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":717},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":719},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":721},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":723},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":725},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":727},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":729},[],{"name":731,"type":549,"required":467,"nullable":445,"constraints":732},"offices_min",[],{"name":570,"type":549,"required":467,"nullable":445,"constraints":734},[],{"name":736,"type":549,"required":467,"nullable":445,"constraints":737},"meeting_rooms_min",[],{"name":573,"type":549,"required":467,"nullable":445,"constraints":739},[],{"name":576,"type":549,"required":467,"nullable":445,"constraints":741},[],{"name":295,"type":743,"required":467,"nullable":467,"constraints":744,"children":745},"TerrenoPreferences",[],[746,748,750,752,755,757,759,761,763,765,767],{"name":539,"type":526,"required":467,"nullable":445,"constraints":747},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":749},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":751},[],{"name":753,"type":526,"required":467,"nullable":445,"constraints":754},"topography",[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":756},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":758},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":760},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":762},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":764},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":766},[],{"name":768,"type":549,"required":467,"nullable":445,"constraints":769},"size_built_min",[],{"name":298,"type":771,"required":467,"nullable":467,"constraints":772,"children":773},"AparcamientoPreferences",[],[774,776,778,781,783,785,787],{"name":542,"type":526,"required":467,"nullable":445,"constraints":775},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":777},[],{"name":779,"type":549,"required":467,"nullable":445,"constraints":780},"min_seats",[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":782},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":784},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":786},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":788},[],{"name":301,"type":790,"required":467,"nullable":467,"constraints":791,"children":792},"BuildingPreferences",[],[793,795,797,799,801,803,805,807,809,811,814,817,820,823],{"name":535,"type":536,"required":467,"nullable":445,"constraints":794},[],{"name":542,"type":526,"required":467,"nullable":445,"constraints":796},[],{"name":548,"type":549,"required":467,"nullable":445,"constraints":798},[],{"name":552,"type":549,"required":467,"nullable":445,"constraints":800},[],{"name":545,"type":526,"required":467,"nullable":445,"constraints":802},[],{"name":555,"type":549,"required":467,"nullable":445,"constraints":804},[],{"name":558,"type":549,"required":467,"nullable":445,"constraints":806},[],{"name":561,"type":549,"required":467,"nullable":445,"constraints":808},[],{"name":564,"type":549,"required":467,"nullable":445,"constraints":810},[],{"name":812,"type":549,"required":467,"nullable":445,"constraints":813},"num_floors_min",[],{"name":815,"type":549,"required":467,"nullable":445,"constraints":816},"num_locales_min",[],{"name":818,"type":549,"required":467,"nullable":445,"constraints":819},"usable_area_min",[],{"name":821,"type":549,"required":467,"nullable":445,"constraints":822},"num_parkings_min",[],{"name":824,"type":549,"required":467,"nullable":445,"constraints":825},"num_viviendas_min",[],{"name":314,"type":518,"required":467,"nullable":467,"constraints":827},[],{"name":829,"type":466,"required":467,"nullable":445,"constraints":830},"internal_notes",[],{"name":832,"type":833,"required":467,"nullable":467,"description":834,"constraints":835},"agency_property_ids","array of integers","Property IDs linked to the contact. Stored only when `type` is `agencia-inmobiliaria`.",[],{"name":837,"type":518,"required":467,"nullable":467,"description":838,"constraints":839,"children":840},"services","Services offered by the contact. Stored only when `type` is `entidad-bancaria` or `proveedor-servicios`.",[],[841,844,848,853],{"name":318,"type":466,"required":445,"nullable":467,"constraints":842},[843],"1–255 chars",{"name":845,"type":466,"required":467,"nullable":445,"constraints":846},"category",[847],"≤ 80 chars",{"name":849,"type":850,"required":467,"nullable":445,"constraints":851},"approximate_cost","number",[852],"≥ 0",{"name":339,"type":466,"required":467,"nullable":445,"constraints":854},[855],"≤ 2000 chars",[857,862,866,870,875,878],{"name":858,"type":549,"required":467,"nullable":445,"description":859,"defaultValue":860,"constraints":861,"ignored":445},"rating","Ignored: inquiries are stored with rating 3.","0",[],{"name":360,"type":863,"required":467,"nullable":445,"description":864,"constraints":865,"ignored":445},"boolean","Ignored: inquiries are always stored as active.",[],{"name":867,"type":466,"required":467,"nullable":445,"description":868,"constraints":869,"ignored":445},"captured_by","Ignored: inquiries are stored as captured by `Web`.",[],{"name":871,"type":549,"required":467,"nullable":445,"description":872,"constraints":873,"ignored":445},"agency_id","Ignored by this endpoint.",[874],"≥ 1",{"name":876,"type":833,"required":467,"nullable":467,"description":872,"constraints":877,"ignored":445},"agency_client_ids",[],{"name":879,"type":549,"required":467,"nullable":445,"description":872,"defaultValue":860,"constraints":880,"ignored":445},"time_to_create",[],[882,901,905,908,910,914],{"status":883,"description":884,"schemaName":885,"fields":886,"example":899,"exampleHtml":900},"200","Successful response.","LeadInquiryResponse",[887,892,896],{"name":888,"type":466,"required":445,"nullable":467,"enumValues":889,"constraints":891},"status",[890],"ok",[],{"name":893,"type":466,"required":467,"nullable":445,"description":894,"constraints":895},"authenticated_as","Name of the business that owns the API key.",[],{"name":418,"type":549,"required":467,"nullable":445,"description":897,"constraints":898},"ID of the created lead, or of the existing unnamed lead that was completed.",[],"{\n  \"status\": \"ok\",\n  \"authenticated_as\": \"Inmobiliaria Ejemplo\",\n  \"lead_id\": 228\n}","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  \"status\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"ok\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  \"authenticated_as\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Inmobiliaria Ejemplo\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  \"lead_id\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">228\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"status":902,"description":903,"schemaName":904},"400","The lead could not be stored.","ExternalApiError",{"status":906,"description":907,"schemaName":904},"401","The API key is missing, malformed, unknown, revoked or expired, or lacks the required scope.",{"status":429,"description":909,"schemaName":904},"The business already has a named lead with this primary phone.",{"status":911,"description":912,"schemaName":913},"422","A path parameter, query parameter or body field is invalid.","ExternalValidationError",{"status":915,"description":916,"schemaName":904},"500","Unexpected server error while processing the request.",[918,924,929],{"id":919,"label":920,"lang":921,"code":922,"html":923},"curl","cURL","bash","curl -X POST \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries\" \\\n  -H \"X-Api-Key: $VESTTA_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n  \"name\": \"Ana García\",\n  \"type\": \"demandante\",\n  \"preferred_language\": \"es\",\n  \"phone_number_1\": \"+34600111222\",\n  \"personal_email\": \"ana@example.com\",\n  \"source\": \"web\",\n  \"sourcePage\": \"https:\u002F\u002Fexample.com\u002Fcontacto\",\n  \"notes\": \"Busco piso de dos habitaciones cerca del centro.\",\n  \"search_preferences\": [\n    {\n      \"operations\": [\n        \"alquiler\"\n      ],\n      \"property_types\": [\n        \"apartamento\"\n      ],\n      \"apartamento\": {\n        \"price_rent_max\": 1200,\n        \"bedrooms_min\": 2\n      },\n      \"locations\": [\n        {\n          \"name\": \"Madrid\"\n        }\n      ]\n    }\n  ]\n}'","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1\">curl\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> -X\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> POST\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries\"\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  -H\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> \"X-Api-Key: \u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">$VESTTA_API_KEY\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  -H\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> \"Content-Type: application\u002Fjson\"\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5\">  -d\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\"> '{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"name\": \"Ana García\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"type\": \"demandante\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"preferred_language\": \"es\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"phone_number_1\": \"+34600111222\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"personal_email\": \"ana@example.com\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"source\": \"web\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"sourcePage\": \"https:\u002F\u002Fexample.com\u002Fcontacto\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"notes\": \"Busco piso de dos habitaciones cerca del centro.\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"search_preferences\": [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"operations\": [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"alquiler\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"property_types\": [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"apartamento\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"apartamento\": {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"price_rent_max\": 1200,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"bedrooms_min\": 2\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      \"locations\": [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">          \"name\": \"Madrid\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">      ]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  ]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">}'\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"id":925,"label":926,"lang":925,"code":927,"html":928},"javascript","JavaScript","const response = await fetch('https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.VESTTA_API_KEY,\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    \"name\": \"Ana García\",\n    \"type\": \"demandante\",\n    \"preferred_language\": \"es\",\n    \"phone_number_1\": \"+34600111222\",\n    \"personal_email\": \"ana@example.com\",\n    \"source\": \"web\",\n    \"sourcePage\": \"https:\u002F\u002Fexample.com\u002Fcontacto\",\n    \"notes\": \"Busco piso de dos habitaciones cerca del centro.\",\n    \"search_preferences\": [\n      {\n        \"operations\": [\n          \"alquiler\"\n        ],\n        \"property_types\": [\n          \"apartamento\"\n        ],\n        \"apartamento\": {\n          \"price_rent_max\": 1200,\n          \"bedrooms_min\": 2\n        },\n        \"locations\": [\n          {\n            \"name\": \"Madrid\"\n          }\n        ]\n      }\n    ]\n  }),\n})\n\nconst data = await response.json()","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">const\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> response\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> await\u003C\u002Fspan>\u003Cspan style=\"color:#6F42C1\"> fetch\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">(\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">'https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  method: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">'POST'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  headers: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    'X-Api-Key'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: process.env.\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">VESTTA_API_KEY\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">'application\u002Fjson'\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  body: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">JSON\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">.\u003C\u002Fspan>\u003Cspan style=\"color:#6F42C1\">stringify\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">({\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Ana García\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"type\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"demandante\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"preferred_language\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"es\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"phone_number_1\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"+34600111222\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"personal_email\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"ana@example.com\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"source\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"web\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"sourcePage\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"https:\u002F\u002Fexample.com\u002Fcontacto\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"notes\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Busco piso de dos habitaciones cerca del centro.\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"search_preferences\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">      {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"operations\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">          \"alquiler\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">        ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"property_types\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">          \"apartamento\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">        ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"apartamento\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">          \"price_rent_max\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">1200\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">          \"bedrooms_min\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">2\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">        },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"locations\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">          {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">            \"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Madrid\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">          }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">        ]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">      }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">    ]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">  }),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">})\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">const\u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\"> data\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\"> await\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> response.\u003C\u002Fspan>\u003Cspan style=\"color:#6F42C1\">json\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">()\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"id":930,"label":931,"lang":930,"code":932,"html":933},"python","Python","import os\n\nimport requests\n\nresponse = requests.post(\n    \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries\",\n    headers={\"X-Api-Key\": os.environ[\"VESTTA_API_KEY\"]},\n    json={\n        \"name\": \"Ana García\",\n        \"type\": \"demandante\",\n        \"preferred_language\": \"es\",\n        \"phone_number_1\": \"+34600111222\",\n        \"personal_email\": \"ana@example.com\",\n        \"source\": \"web\",\n        \"sourcePage\": \"https:\u002F\u002Fexample.com\u002Fcontacto\",\n        \"notes\": \"Busco piso de dos habitaciones cerca del centro.\",\n        \"search_preferences\": [\n            {\n                \"operations\": [\n                    \"alquiler\",\n                ],\n                \"property_types\": [\n                    \"apartamento\",\n                ],\n                \"apartamento\": {\n                    \"price_rent_max\": 1200,\n                    \"bedrooms_min\": 2,\n                },\n                \"locations\": [\n                    {\n                        \"name\": \"Madrid\",\n                    },\n                ],\n            },\n        ],\n    },\n)\nresponse.raise_for_status()\ndata = response.json()","\u003Cpre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">import\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> os\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49\">import\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> requests\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">response \u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> requests.post(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">    \"https:\u002F\u002Fapi.vestta.app\u002Fv1\u002Fext\u002Fleads\u002Finquiries\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E36209\">    headers\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">{\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"X-Api-Key\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: os.environ[\u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"VESTTA_API_KEY\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">]},\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E36209\">    json\u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Ana García\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"type\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"demandante\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"preferred_language\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"es\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"phone_number_1\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"+34600111222\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"personal_email\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"ana@example.com\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"source\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"web\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"sourcePage\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"https:\u002F\u002Fexample.com\u002Fcontacto\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"notes\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Busco piso de dos habitaciones cerca del centro.\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">        \"search_preferences\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">            {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                \"operations\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                    \"alquiler\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                \"property_types\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                    \"apartamento\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                \"apartamento\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                    \"price_rent_max\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">1200\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                    \"bedrooms_min\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">2\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                \"locations\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                    {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">                        \"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"Madrid\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                    },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">                ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">            },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">        ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">    },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">response.raise_for_status()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">data \u003C\u002Fspan>\u003Cspan style=\"color:#D73A49\">=\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\"> response.json()\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1791110048970]