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.

notes and rating can also be updated. Set notes to null to clear it; set rating to 0 to remove the star rating. Ratings must be integers from 0 to 5 and cannot be null. Omitted notes and ratings keep their saved values. Neither field is returned by lead reads.

Example request

curl -X PATCH "https://api.vestta.io/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
  • notesstring≤ 50000 chars

    Private CRM contact notes. Use null to clear them.

  • ratinginteger≥ 0≤ 5

    CRM star rating from 0 (unrated) to 5. Use 0 to reset it.

  • 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, or the business plan does not include API access.
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.
429 The API key reached its request limit. Wait for the number of seconds in `Retry-After` before retrying.
500 Internal Server ErrorUnexpected server error while processing the request.

Error bodies and how to handle each case: Errors.