[{"data":1,"prerenderedAt":546},["ShallowReactive",2],{"page:\u002Fleads\u002Fcreate":3,"operation:createLead":74},{"id":4,"title":5,"body":6,"description":64,"extension":65,"meta":66,"navigation":67,"operation":68,"path":69,"rawbody":70,"seo":71,"stem":72,"__hash__":73},"docs\u002Fleads\u002Fcreate.md","Create a contact",{"type":7,"value":8,"toc":60},"minimark",[9,36,53],[10,11,12,13,17,18,21,22,21,25,21,28,31,32,35],"p",{},"Requires ",[14,15,16],"code",{},"leads:write",". The canonical contact types are ",[14,19,20],{},"demandante",", ",[14,23,24],{},"propietario",[14,26,27],{},"agencia-inmobiliaria",[14,29,30],{},"entidad-bancaria"," and ",[14,33,34],{},"proveedor-servicios",". Phone numbers are normalized to international E.164; email addresses are validated.",[10,37,38,39,42,43,46,47,52],{},"The response is ",[14,40,41],{},"201"," with the new ",[14,44,45],{},"id",". Contacts and their personal data are private to the workspace; this operation does not publish them on the property portal or start automated outreach. Use ",[48,49,51],"a",{"href":50},"\u002Fleads\u002Finquiries","Create an inquiry"," for a form with configured follow-up.",[10,54,55,56,59],{},"The optional ",[14,57,58],{},"Idempotency-Key"," header has the same 24-hour replay and conflict rules as property creation.",{"title":61,"searchDepth":62,"depth":62,"links":63},"",3,[],"Create a private CRM contact without initiating outreach.","md",{},true,"createLead","\u002Fleads\u002Fcreate","---\ntitle: Create a contact\ndescription: Create a private CRM contact without initiating outreach.\noperation: createLead\n---\n\nRequires `leads:write`. The canonical contact types are `demandante`, `propietario`, `agencia-inmobiliaria`, `entidad-bancaria` and `proveedor-servicios`. Phone numbers are normalized to international E.164; email addresses are validated.\n\nThe response is `201` with the new `id`. Contacts and their personal data are private to the workspace; this operation does not publish them on the property portal or start automated outreach. Use [Create an inquiry](\u002Fleads\u002Finquiries) for a form with configured follow-up.\n\nThe optional `Idempotency-Key` header has the same 24-hour replay and conflict rules as property creation.\n",{"title":5,"description":64},"leads\u002Fcreate","y33c3wgYAK7n5XrhvZdgeh05e_uKPKIzu-VxHOtlj2w",{"id":68,"method":75,"path":76,"fullPath":77,"summary":5,"tag":78,"scopes":79,"url":80,"description":81,"pathParams":82,"queryParams":83,"headerParams":84,"body":91,"responses":496,"samples":529,"docsPath":69},"POST","\u002Fleads","\u002Fv1\u002Fleads","Leads",[16],"https:\u002F\u002Fapi.vestta.io\u002Fv1\u002Fleads","Creates a CRM contact without initiating outreach. Requires the `leads:write` scope. Supports `Idempotency-Key`.",[],[],[85],{"name":86,"type":87,"required":88,"nullable":67,"constraints":89},"idempotency-key","string",false,[90],"1–200 chars",{"schemaName":92,"required":67,"fields":93,"ignored":495},"LeadCreateRequest",[94,97,101,105,109,112,116,119,128,133,138],{"name":95,"type":87,"required":67,"nullable":88,"constraints":96},"name",[90],{"name":98,"type":87,"required":67,"nullable":88,"enumValues":99,"constraints":100},"type",[20,24,27,30,34],[],{"name":102,"type":87,"required":67,"nullable":88,"constraints":103},"phone_number_1",[104],"5–30 chars",{"name":106,"type":87,"required":88,"nullable":67,"constraints":107},"phone_number_2",[108],"≤ 30 chars",{"name":110,"type":87,"required":88,"nullable":67,"constraints":111},"landline_phone",[108],{"name":113,"type":87,"required":88,"nullable":67,"constraints":114},"personal_email",[115],"≤ 254 chars",{"name":117,"type":87,"required":88,"nullable":67,"constraints":118},"professional_email",[115],{"name":120,"type":87,"required":88,"nullable":88,"defaultValue":121,"enumValues":122,"constraints":127},"preferred_language","es",[121,123,124,125,126],"gb","fr","ge","it",[],{"name":129,"type":130,"required":88,"nullable":88,"defaultValue":131,"constraints":132},"active","boolean","true",[],{"name":134,"type":87,"required":88,"nullable":88,"defaultValue":135,"constraints":136},"source","external_api",[137],"1–100 chars",{"name":139,"type":140,"required":88,"nullable":88,"constraints":141,"children":142},"search_preferences","array of objects",[],[143,146,150,153,211,256,292,323,347,384,415,437,477,480,483,486,489,492],{"name":144,"type":87,"required":88,"nullable":67,"constraints":145},"request_id",[],{"name":147,"type":148,"required":88,"nullable":88,"constraints":149},"operations","array of strings",[],{"name":151,"type":148,"required":88,"nullable":88,"constraints":152},"property_types",[],{"name":154,"type":155,"required":88,"nullable":88,"constraints":156,"children":157},"apartamento","ApartmentPreferences",[],[158,161,165,168,171,174,178,181,184,187,190,193,196,199,202,205,208],{"name":159,"type":148,"required":88,"nullable":88,"constraints":160},"requireds",[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":164},"specs","object",[],{"name":166,"type":148,"required":88,"nullable":67,"constraints":167},"views",[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":170},"features",[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":173},"subtypes",[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":177},"size_max","integer",[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":180},"size_min",[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":183},"price_max",[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":186},"price_min",[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":189},"price_rent_max",[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":192},"price_rent_min",[],{"name":194,"type":176,"required":88,"nullable":67,"constraints":195},"bedrooms_min",[],{"name":197,"type":176,"required":88,"nullable":67,"constraints":198},"bathrooms_min",[],{"name":200,"type":176,"required":88,"nullable":67,"constraints":201},"num_terraces_min",[],{"name":203,"type":176,"required":88,"nullable":67,"constraints":204},"size_terraces_min",[],{"name":206,"type":176,"required":88,"nullable":67,"constraints":207},"doble_bedrooms_min",[],{"name":209,"type":176,"required":88,"nullable":67,"constraints":210},"suite_bathrooms_min",[],{"name":212,"type":213,"required":88,"nullable":88,"constraints":214,"children":215},"casa","HousePreferences",[],[216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,253],{"name":159,"type":148,"required":88,"nullable":88,"constraints":217},[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":219},[],{"name":166,"type":148,"required":88,"nullable":67,"constraints":221},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":223},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":225},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":227},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":229},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":231},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":233},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":235},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":237},[],{"name":194,"type":176,"required":88,"nullable":67,"constraints":239},[],{"name":197,"type":176,"required":88,"nullable":67,"constraints":241},[],{"name":200,"type":176,"required":88,"nullable":67,"constraints":243},[],{"name":203,"type":176,"required":88,"nullable":67,"constraints":245},[],{"name":206,"type":176,"required":88,"nullable":67,"constraints":247},[],{"name":209,"type":176,"required":88,"nullable":67,"constraints":249},[],{"name":251,"type":176,"required":88,"nullable":67,"constraints":252},"plot_size_min",[],{"name":254,"type":176,"required":88,"nullable":67,"constraints":255},"porch_size_min",[],{"name":257,"type":258,"required":88,"nullable":88,"constraints":259,"children":260},"local","LocalPreferences",[],[261,263,265,267,269,271,273,275,277,279,281,284,287,290],{"name":159,"type":148,"required":88,"nullable":88,"constraints":262},[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":264},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":266},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":268},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":270},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":272},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":274},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":276},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":278},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":280},[],{"name":282,"type":176,"required":88,"nullable":67,"constraints":283},"height_min",[],{"name":285,"type":176,"required":88,"nullable":67,"constraints":286},"facade_meters_min",[],{"name":288,"type":176,"required":88,"nullable":67,"constraints":289},"showcase_meters_min",[],{"name":197,"type":176,"required":88,"nullable":67,"constraints":291},[],{"name":293,"type":294,"required":88,"nullable":88,"constraints":295,"children":296},"nave","NavePreferences",[],[297,299,301,303,305,307,309,311,313,315,317,319,321],{"name":159,"type":148,"required":88,"nullable":88,"constraints":298},[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":300},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":302},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":304},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":306},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":308},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":310},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":312},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":314},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":316},[],{"name":282,"type":176,"required":88,"nullable":67,"constraints":318},[],{"name":285,"type":176,"required":88,"nullable":67,"constraints":320},[],{"name":288,"type":176,"required":88,"nullable":67,"constraints":322},[],{"name":324,"type":325,"required":88,"nullable":88,"description":326,"constraints":327,"children":328},"almacenaje","StoragePreferences","Preferencias para almacenes y trasteros independientes.",[],[329,331,333,335,337,339,341,343,345],{"name":159,"type":148,"required":88,"nullable":88,"constraints":330},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":332},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":334},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":336},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":338},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":340},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":342},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":344},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":346},[],{"name":348,"type":349,"required":88,"nullable":88,"constraints":350,"children":351},"oficina","OficinaPreferences",[],[352,354,356,358,360,362,364,366,368,370,372,375,377,380,382],{"name":159,"type":148,"required":88,"nullable":88,"constraints":353},[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":355},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":357},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":359},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":361},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":363},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":365},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":367},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":369},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":371},[],{"name":373,"type":176,"required":88,"nullable":67,"constraints":374},"offices_min",[],{"name":197,"type":176,"required":88,"nullable":67,"constraints":376},[],{"name":378,"type":176,"required":88,"nullable":67,"constraints":379},"meeting_rooms_min",[],{"name":200,"type":176,"required":88,"nullable":67,"constraints":381},[],{"name":203,"type":176,"required":88,"nullable":67,"constraints":383},[],{"name":385,"type":386,"required":88,"nullable":88,"constraints":387,"children":388},"terreno","TerrenoPreferences",[],[389,391,393,395,397,400,402,404,406,408,410,412],{"name":159,"type":148,"required":88,"nullable":88,"constraints":390},[],{"name":166,"type":148,"required":88,"nullable":67,"constraints":392},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":394},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":396},[],{"name":398,"type":148,"required":88,"nullable":67,"constraints":399},"topography",[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":401},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":403},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":405},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":407},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":409},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":411},[],{"name":413,"type":176,"required":88,"nullable":67,"constraints":414},"size_built_min",[],{"name":416,"type":417,"required":88,"nullable":88,"constraints":418,"children":419},"aparcamiento","AparcamientoPreferences",[],[420,422,424,426,429,431,433,435],{"name":159,"type":148,"required":88,"nullable":88,"constraints":421},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":423},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":425},[],{"name":427,"type":176,"required":88,"nullable":67,"constraints":428},"min_seats",[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":430},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":432},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":434},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":436},[],{"name":438,"type":439,"required":88,"nullable":88,"constraints":440,"children":441},"edificio","BuildingPreferences",[],[442,444,446,448,450,452,454,456,458,460,462,465,468,471,474],{"name":159,"type":148,"required":88,"nullable":88,"constraints":443},[],{"name":162,"type":163,"required":88,"nullable":67,"constraints":445},[],{"name":169,"type":148,"required":88,"nullable":67,"constraints":447},[],{"name":175,"type":176,"required":88,"nullable":67,"constraints":449},[],{"name":179,"type":176,"required":88,"nullable":67,"constraints":451},[],{"name":172,"type":148,"required":88,"nullable":67,"constraints":453},[],{"name":182,"type":176,"required":88,"nullable":67,"constraints":455},[],{"name":185,"type":176,"required":88,"nullable":67,"constraints":457},[],{"name":188,"type":176,"required":88,"nullable":67,"constraints":459},[],{"name":191,"type":176,"required":88,"nullable":67,"constraints":461},[],{"name":463,"type":176,"required":88,"nullable":67,"constraints":464},"num_floors_min",[],{"name":466,"type":176,"required":88,"nullable":67,"constraints":467},"num_locales_min",[],{"name":469,"type":176,"required":88,"nullable":67,"constraints":470},"usable_area_min",[],{"name":472,"type":176,"required":88,"nullable":67,"constraints":473},"num_parkings_min",[],{"name":475,"type":176,"required":88,"nullable":67,"constraints":476},"num_viviendas_min",[],{"name":478,"type":140,"required":88,"nullable":88,"constraints":479},"locations",[],{"name":481,"type":87,"required":88,"nullable":67,"constraints":482},"internal_notes",[],{"name":484,"type":87,"required":88,"nullable":67,"constraints":485},"title",[],{"name":487,"type":87,"required":88,"nullable":67,"constraints":488},"color",[],{"name":490,"type":87,"required":88,"nullable":67,"constraints":491},"urgency",[],{"name":493,"type":87,"required":88,"nullable":67,"constraints":494},"status",[],[],[497,509,513,516,519,522,526],{"status":41,"description":498,"schemaName":499,"fields":500,"example":507,"exampleHtml":508},"Successful response.","ResourceCreated",[501,505],{"name":493,"type":87,"required":88,"nullable":88,"defaultValue":502,"enumValues":503,"constraints":504},"ok",[502],[],{"name":45,"type":176,"required":67,"nullable":88,"constraints":506},[],"{\n  \"status\": \"ok\",\n  \"id\": 1355\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\">  \"id\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#005CC5\">1355\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"status":510,"description":511,"schemaName":512},"401","The API key is missing, malformed, unknown, revoked or expired.","ExternalApiError",{"status":514,"description":515,"schemaName":512},"403","The API key lacks the required scope.",{"status":517,"description":518,"schemaName":512},"404","The resource does not exist in this business.",{"status":520,"description":521,"schemaName":512},"409","Duplicate contact or idempotency key reused with a different payload.",{"status":523,"description":524,"schemaName":525},"422","A path parameter, query parameter or body field is invalid.","ExternalValidationError",{"status":527,"description":528,"schemaName":512},"500","Unexpected server error while processing the request.",[530,536,541],{"id":531,"label":532,"lang":533,"code":534,"html":535},"curl","cURL","bash","curl -X POST \"https:\u002F\u002Fapi.vestta.io\u002Fv1\u002Fleads\" \\\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  \"phone_number_1\": \"+34600111222\",\n  \"source\": \"integration\"\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.io\u002Fv1\u002Fleads\"\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\">  \"phone_number_1\": \"+34600111222\",\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">  \"source\": \"integration\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62\">}'\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",{"id":537,"label":538,"lang":537,"code":539,"html":540},"javascript","JavaScript","const response = await fetch('https:\u002F\u002Fapi.vestta.io\u002Fv1\u002Fleads', {\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    \"phone_number_1\": \"+34600111222\",\n    \"source\": \"integration\"\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.io\u002Fv1\u002Fleads'\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\">    \"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\">    \"source\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"integration\"\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":542,"label":543,"lang":542,"code":544,"html":545},"python","Python","import os\n\nimport requests\n\nresponse = requests.post(\n    \"https:\u002F\u002Fapi.vestta.io\u002Fv1\u002Fleads\",\n    headers={\"X-Api-Key\": os.environ[\"VESTTA_API_KEY\"]},\n    json={\n        \"name\": \"Ana García\",\n        \"type\": \"demandante\",\n        \"phone_number_1\": \"+34600111222\",\n        \"source\": \"integration\",\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.io\u002Fv1\u002Fleads\"\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\">        \"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\">        \"source\"\u003C\u002Fspan>\u003Cspan style=\"color:#24292E\">: \u003C\u002Fspan>\u003Cspan style=\"color:#032F62\">\"integration\"\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\">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>",1791929309789]