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