Ventia
Contact

Modify contact

Partially updates a contact. Send only the fields you want to change; omitted fields are left untouched. The assigned agent and the status of a contact cannot be changed through this endpoint.

PATCH
/contact/{idcontact}

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key sent as Authorization: Bearer <API_KEY>.

Path Parameters

idcontact*string

Request Body

application/json
  1. body

Partial update. Only the fields present in the body are changed; every other field keeps its stored value. At least one field is required.

firstName?string
Length1 <= length <= 32
lastName?string
Lengthlength <= 32
emails?array<>

Replaces the full list of emails.

phones?array<string>

Replaces the full list of phones. Numbers are validated and normalized with the company country code, and must not belong to another contact.

detail?string
govId?string
statusTag?string

Code or name of one of the company's status tags.

additionalData?

Additional (custom) contact fields, keyed by field code. Merged key-by-key over the stored values; keys not configured for the company are dropped.

origin?string

Code or name of one of the company's origins.

affiliatedCompanyGroup?array<>

Replaces the companies the contact belongs to. Use the company group ids from the Company groups endpoints.

location?|

Contact address. Send null to clear it.

Response Body

OK

application/json; charset=utf-8
  1. response
_id*string
company*string
firstName*string
lastName*string
origin*string
phones*array<string>
archivingReason*string
status*string
emails*array<string>
detail*string
createdAt*string
updatedAt*string
__v*integer
Formatint32
lastInteraction*string
archivingReasonText*string
assignedGroups*array<string>
attention*string
channels*array<string>
databaseUploded*boolean
reminder*string
curl -X PATCH 'https://api.getventia.com/api/v1.0/contact/string' \  -H 'Content-Type: application/json' \  -d '{  "detail": "Interested in the premium plan",  "statusTag": "hot",  "origin": "store",  "additionalData": {    "budget": 5000  },  "affiliatedCompanyGroup": [    {      "companyGroup": "64666685696358053f46c33a",      "role": "CFO"    }  ],  "location": {    "address": "Av. 18 de Julio 1234, Montevideo",    "latitude": -34.9058,    "longitude": -56.1913  }}'
{  "_id": "621e8a5463c02a8bd532ff8c",  "company": "609b3cff61ffd5f1e446d234",  "firstName": "Agustin",  "lastName": "Perez",  "origin": "local",  "phones": [    "+59897444666"  ],  "archivingReason": "",  "status": "new",  "emails": [    "agustin@example.com"  ],  "detail": "",  "createdAt": "2022-03-01T21:04:20.617Z",  "updatedAt": "2023-05-23T20:20:25.420Z",  "__v": 1,  "lastInteraction": "2023-05-23T20:20:25.418Z",  "archivingReasonText": "",  "assignedGroups": [],  "attention": "not_actions",  "channels": [],  "databaseUploded": false,  "reminder": "2023-05-23T20:25:02.561Z"}