Skip to content

Loading…

Update a contact

Update only supplied contact fields.

PATCH/v1/leads/{lead_id}

Requires the leads:write scope

On this page

Requires 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.

Example request

curl -X PATCH "https://api.vestta.app/v1/leads/1" \
  -H "X-Api-Key: $VESTTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana García",
  "personal_email": "ana@example.com"
}'

Authorization

  • X-Api-Keystringheaderrequired

    Your API key, AC_LIVE_<key_id>.<secret>. Authorization: ApiKey <key> is also accepted.

Path parameters

  • lead_idintegerrequired≥ 1

Request body

application/json · required

  • namestring1–200 chars
  • typestring

    One ofdemandantepropietarioagencia-inmobiliariaentidad-bancariaproveedor-servicios

  • phone_number_1string5–30 chars
  • phone_number_2string≤ 30 chars
  • landline_phonestring≤ 30 chars
  • personal_emailstring≤ 254 chars
  • professional_emailstring≤ 254 chars
  • preferred_languagestring

    One ofesgbfrgeit

  • activeboolean
  • sourcestring1–100 chars
  • search_preferencesarray of objects

Response

200 Successful response.

Example response
{
  "status": "ok",
  "id": 1355
}

Response fields

  • statusstring default: ok always ok
  • idintegerrequired

Errors

StatusWhen
401 UnauthorizedThe API key is missing, malformed, unknown, revoked or expired.
403 ForbiddenThe API key lacks the required scope.
404 Not FoundThe resource does not exist in this business.
409 ConflictDuplicate contact or idempotency key reused with a different payload.
422 Unprocessable ContentA path parameter, query parameter or body field is invalid.
500 Internal Server ErrorUnexpected server error while processing the request.

Error bodies and how to handle each case: Errors.